Thread: Regex examples
View Single Post
Old 08-31-2014, 01:56 AM   #407
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 7,573
Karma: 13307783
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Steadyhands View Post
Note you will have to change the xxxx to whatever your paragraph style and there is a space after the \1
No, change the xxxx\d+ . (This may be why ReaderRabbit was no successful, as it certainly would lead to failure if the class does not have trailing numbers. Like in the example given: "indent".)

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)

Last edited by eschwartz; 08-31-2014 at 02:01 AM.
eschwartz is offline   Reply With Quote