Thread: Regex examples
View Single Post
Old 08-31-2014, 07:48 AM   #408
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 14,524
Karma: 78507164
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by eschwartz View Post
It woud be better to use a catchall like

Find:
Code:
((Mr|Mrs|Dr|other)\.)</p>\s*<p( [^>]*)?>
Replace:
Code:
\1
(space after the 1)
Which would exclude paragraphs that had no attributes. Why not:
Code:
((Mr|Mrs|Dr|other)\.)</p>\s*<p[^>]*?>
Replace:
Code:
\1
(space after the 1)
instead?
DiapDealer is online now   Reply With Quote