View Single Post
Old 03-12-2015, 11:31 AM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
RegEx question about repeating

I have simple stored search RE to replace em, en, and dash in Hx's (mostly for consistent formatting)

Find : <([Hh][1-6])>(.*?)\s*[-—–]{1,}\s*(.*?)</\1>

Replace: <\1>\2 \3</\1>

The once in awhile problem occurs when there are 2 or more em, en, or dash in the same Hx


Code:
<h1>fasfasdsadf –    asdfsdfsd — sdafasdasd - asasdf - asdsadf - asdasdf</h1>
Is there are a way to have the RE do them all, or do I still have to do [Replace All] until 0 are found?

Last edited by phossler; 03-12-2015 at 03:16 PM. Reason: Supposed to be Hx and not just H1s
phossler is offline   Reply With Quote