ms word - RegEx : Remove line breaks if lookbehind shows a lowercase -
i'm doing ctrl+h (find & replace) in notepad++
i want find line breaks followed lowercase characters in order replace them space character ; thereby removing unwanted break lines in text.
find : \r\n+(?![a-z]|[0-9])
replace : insert space character here
*make sure selected "match case" , "regular expression".
it works perfect.
now, i'd same in microsoft office word documents. clues?
in microsoft word, following:
on home tab, in editing group, click replace open find , replace dialog box.
check
use wildcards
check box. if don't see use wildcards check box, click more, , select check box.in
find what:
box, enter following regular expression:([a-z])^13
in
replace with:
box, enter:\1
- thats: (backslash 1 space) (don't forget space!)
and that's it! click either replace
button or replace all
button.
note: in ms word, ^13
character matches paragraph mark @ end of each line.
here's more information microsoft word , regular expressions - http://office.microsoft.com/en-us/word-help/find-and-replace-text-by-using-regular-expressions-advanced-ha102350661.aspx
edit:
oh, above matches lowercase letter preceding line break.
if want match line break followed lowercase letter, following:
in
find what:
box, enter following regular expression:^13([a-z])
in
replace with:
box, enter:\1
- thats: (space backslash 1) (don't forget space!)
tested both ways , both work in microsoft word 2010, documentation says regular expressions supported in versions 97 - 2013.
good luck! :)
Comments
Post a Comment