Hello, @mark-d-worthen-psyd, @mark-olson and All,
@mark-d-worthen-psyd, I didn’t answer before, as we were travelling back home. Holidays time is over :-(
Just for information, I found out a method which needs two regex S/R only !
Let’s take again the @mark-olson’s INPUT text :
Dr Worthen: blah1 blah2 Dr Worthen: blah3 blah4 Dr Worthen: blah5 Dr Worthen: blah6 blah7 blah8 John Doe: zjk1 John Doe: zjk2 zjk3 zjk4 zjk5 John Doe: zjk6 pouy1 zjk8 John Doe: pouy2 Bob Quzenheim: vbg Dr Worthen: nvbm Bob Quzenheim: jrrke Bob Quzenheim: bnbnmWith this first S/R, we simply add a line-break after each block of lines, beginning with the same string before the colon
SEARCH (?-s)^(.+:).+\R(\1.+\R)*
REPLACE $0\r\n
Giving this temporary text :
Dr Worthen: blah1 blah2 Dr Worthen: blah3 blah4 Dr Worthen: blah5 Dr Worthen: blah6 blah7 blah8 John Doe: zjk1 John Doe: zjk2 zjk3 zjk4 zjk5 John Doe: zjk6 pouy1 zjk8 John Doe: pouy2 Bob Quzenheim: vbg Dr Worthen: nvbm Bob Quzenheim: jrrke Bob Quzenheim: bnbnmThen, with the second S/R :
It removes the line-break and the next zone till a colon, if this line-break do not begin the current line
It removes any pure empty line, as well
SEARCH (?<=.)\R.+:|^\R OR (?<!^)\R.+:|^\R
REPLACE Leave EMPTY
And we get our expected OUTPUT text :
Dr Worthen: blah1 blah2 blah3 blah4 blah5 blah6 blah7 blah8 John Doe: zjk1 zjk2 zjk3 zjk4 zjk5 zjk6 pouy1 zjk8 pouy2 Bob Quzenheim: vbg Dr Worthen: nvbm Bob Quzenheim: jrrke bnbnmBest Regards,
guy038