Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2019, 10:36 PM
jp91306 jp91306 is offline Replacing random paragraph endings in text Windows 7 64bit Replacing random paragraph endings in text Office 2007
Novice
Replacing random paragraph endings in text
 
Join Date: Nov 2012
Posts: 16
jp91306 is on a distinguished road
Question Replacing random paragraph endings in text

I have a GROUP of LARGE documents that were improperly formatted so they contain paragraph breaks in random places where they should not. I have figured out that almost all of them occur where there is a lower case letter preceeding the error. So searching for [a-z]^13 finds them. But replacing the paragraph character with a space also deletes the preceeding character, so that doesn’t help. I need a way to find and replace only the paragraph character without deleting the preceeding (correct) character.
If I could FIND, move forward one character and then replace, that should work. I don’t know how to do that except manually, and that would take months.
Any ideas?


Thank you.
JP91306
Reply With Quote
  #2  
Old 04-22-2019, 11:09 PM
macropod's Avatar
macropod macropod is offline Replacing random paragraph endings in text Windows 7 64bit Replacing random paragraph endings in text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try, for example, a wildcard Find/Replace with:
Find = ([a-z,])^13
Replace = \1^32
You may also be interested in some of the concepts explored in the 'Cleaning up Text Pasted from Websites, E-mails, PDFs etc.' thread at the top of this forum (https://www.msofficeforums.com/word/...s-e-mails.html).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-23-2019, 11:15 AM
jp91306 jp91306 is offline Replacing random paragraph endings in text Windows 7 64bit Replacing random paragraph endings in text Office 2007
Novice
Replacing random paragraph endings in text
 
Join Date: Nov 2012
Posts: 16
jp91306 is on a distinguished road
Default

That ALMOST works. It does remove the PARAGRAPH mark, but it ALSO adds a space before the "final" letter in the word that precedes the PARAGRAPH mark. . so... [word][paragraph char] becomes [wor d] . ...so that doesn't quite work. I don't understand some of the code so I couldn't guess how to fix it. Thanks, jp
Reply With Quote
  #4  
Old 04-23-2019, 03:32 PM
macropod's Avatar
macropod macropod is offline Replacing random paragraph endings in text Windows 7 64bit Replacing random paragraph endings in text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Unless you inserted a space before the \1 in the Replace expression, that wouldn't happen. The ^32 inserts a space where the paragraph break was.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing paragraph formatting before column break also changes the next paragraph after the break jjmartin1340 Word 3 09-21-2015 10:50 PM
Replacing the 2nd or 3rd instance of Text wdillon2 Word VBA 2 05-13-2015 10:21 PM
Replacing random paragraph endings in text Problem replacing text. piritzo Word 2 06-22-2013 12:50 AM
Replacing random paragraph endings in text Help with replacing text with wildcards sbatson5 Word 2 04-13-2012 03:49 AM
Replacing / editting text LisaC Word 0 02-25-2010 03:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft