How to Replace Numbered Paragraph Marks with Tabs Using Wildcards in Word
Question details
The user wants to use advanced Find and Replace with wildcards to change paragraph breaks into tabs only when the break is immediately followed by a number, preserving the original number.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Reformatting a document layout where numbered lists or numbered paragraphs need to be converted to inline text separated by tabs instead of paragraph breaks.
- Observed behavior
- Paragraph marks currently split text onto new lines right before numbers; the goal is to target these specific breaks using wildcards and align the text with tabs instead.
Press Ctrl+H to open the Find and Replace dialog box, click 'More >>' to expand the advanced search options, and verify that the 'Use wildcards' checkbox is visible.
Use Wildcard Search to Replace Paragraph Marks with Tabs
Use Word's built-in wildcard functionality with capturing groups to precisely target paragraph marks followed by digits, replacing the break with a tab character while keeping the digit intact.
When using wildcards in Word, standard search codes behave differently. For instance, the standard paragraph mark code ^p does not work in the 'Find what' box; you must use ^13 instead. You also need to capture the number in parentheses so it can be referenced and restored in the 'Replace with' box.
Open the Find and Replace dialog by pressing Ctrl+H. Click the 'More >>' button in the bottom left corner and check the box for 'Use wildcards'.
In the 'Find what' box, enter ^13([0-9]). The ^13 finds the paragraph mark, and the parentheses around [0-9] capture any single digit following it into a reference group.
In the 'Replace with' box, enter ^t\1. The ^t inserts a tab character, and the \1 restores the exact number that was captured in the first set of parentheses.
Click 'Find Next' to review the matches one by one, then click 'Replace' to change them, or click 'Replace All' to automatically update the entire document.

Use WPS Writer for Advanced Wildcard Search and Replace
WPS Writer provides a powerful Find and Replace tool with full wildcard support, allowing you to apply complex regular expressions to reformat documents effortlessly.
- 1. Open your document: Launch WPS Office and open your text document using WPS Writer.
- 2. Open Find and Replace: Press Ctrl+H on your keyboard to bring up the Find and Replace dialog box.
- 3. Enable wildcards: Click the 'Advanced' button to reveal more options, and check the 'Use wildcards' box.
- 4. Apply wildcard patterns: Input your wildcard formulas (like ^13 and \1) in the Find and Replace boxes, then click 'Replace All' to instantly format your document.

Frequently Asked Questions
Why doesn't the standard ^p code work in the Find box when wildcards are on?
When the 'Use wildcards' option is checked, Word treats ^p as an invalid character in the 'Find what' field. You must use the ASCII character code ^13 to successfully locate paragraph marks during a wildcard search.
What does \1 mean in the Replace with box?
The \1 code is a backreference. It tells the software to insert the exact text that was captured by the first set of parentheses in your 'Find what' box. This is crucial for retaining variable data like numbering during a replacement.
How do I replace a manual line break instead of a paragraph mark?
If your document uses manual line breaks (created by pressing Shift+Enter) instead of standard paragraph breaks, you will need to search for ^11 instead of ^13 in your wildcard expression.




