View Single Post
Old 01-10-2011, 09:26 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by iblesq View Post
Task: find all strings (in html view), containing "XXX</p>", where XXX - any character, partial string, etc, but not ".</p>"; add an extra line break after </p> (but not after .</p>).

I need to use RegEx in "find and replace" dialog. I found the proper RegEx for searching - ([^\.](</p>)), but i cannot just add after the string I found a new string - <br/>, in the dialog, i.e. it just replace THE WHOLE string with what is written in "replace" field. in other words, the "replace with " field doesn't support RegEx.

Any ideas how just add something new (new string) using "find and replace" and RegEx?

Thanks.
This should work.. Not tested

Minimal Match, (do not match case)

Find: ([a-z"]</p>)
Replace: \1<br />

I included a straight quote for phrases that end that way. remove if not wanted.
match a thru z or quote and a close p tag
replace with what we found and a <br />
theducks is online now   Reply With Quote