How to Remove Unwanted Paragraph Breaks in Word Using Find and Replace
Question details
The user needs to remove unnecessary paragraph breaks that appear between a space and a lowercase letter in OCR-generated Word documents.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Editing and formatting long OCR-generated documents spanning thousands of pages.
- Observed behavior
- Unwanted paragraph breaks inappropriately interrupt the text flow, specifically occurring between spaces and lowercase letters.
Before making bulk replacements using advanced wildcard searches, create a copy of your document to prevent the accidental loss of intended paragraph formatting.
Use Wildcard Search to Remove Specific Paragraph Breaks
Using the wildcard feature in the Find and Replace dialog allows you to target and remove only the unwanted breaks without merging intended paragraphs.
This method specifically looks for a space followed by a paragraph break and a lowercase letter, which is a common error pattern in OCR processing.
Press Ctrl + H on your keyboard to open the Find and Replace dialog box.
Click on the 'More >>' button to expand the advanced search options, then check the box labeled 'Use wildcards'.
In the 'Find what' field, type `( )^13([a-z])`. In the 'Replace with' field, type `\1\2`.
Click 'Replace All'. If the document is extremely large, Word might pause before finishing; simply save your work and click 'Replace All' again to resume.

Replace Standard Paragraph Marks (Use with Caution)
If you need to remove all paragraph breaks indiscriminately, you can use the standard paragraph mark code without wildcards.
Quickly Format OCR Documents with WPS Writer
WPS Writer offers a robust Find and Replace tool equipped with full wildcard support, making it incredibly easy to clean up OCR errors, stray paragraph breaks, and formatting inconsistencies in just a few clicks.
- 1. Open your Document: Launch WPS Writer and open your OCR-generated Word document.
- 2. Access Find and Replace: Press Ctrl + H or go to the Home tab and click on Find and Replace.
- 3. Enable Wildcards: Click 'Advanced', check 'Use wildcards', and input your specific formatting codes to execute the bulk replacement.

Frequently Asked Questions
Why did the wildcard search stop before finishing the entire document?
When processing extremely large documents (such as thousands of OCR pages), the software's memory limit may cause the Replace All action to pause or timeout. Simply save the document and click Replace All again to resume from where it stopped.
What is the difference between ^p and ^13 in Find and Replace?
In standard Find and Replace, `^p` represents a paragraph break. However, when 'Use wildcards' is enabled, the `^p` code is not recognized in the 'Find what' field; you must use `^13` to accurately search for paragraph marks.
Can I undo a Replace All operation if it ruins my formatting?
Yes, you can press Ctrl + Z immediately after executing the Replace All command to revert the document back to its previous state. However, if the operation spans thousands of pages, the undo cache might struggle, which is why saving a backup copy beforehand is crucial.
Why are my replaced words combining without a space?
If you replace a paragraph mark with nothing, the last word of the previous paragraph and the first word of the next paragraph will merge. Ensure you type a space in the 'Replace with' box, or use the `\1\2` reference method when using wildcards to preserve the existing spaces.




