View Single Post
Old 03-03-2010, 12:29 PM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
In most regex implementations, the "matches" for expressions are represented in the "replace" string by "\1", "\2", etc, so to replace:

<p>nnn<p>

by

<h3>nnn</h3>

you'd use a search string of:

<p>[0-9]*</p>

and a replace string of:

<h3>\1</h3>

where the "\1" will contain whatever was matched by the "[0-9]*".
HarryT is offline   Reply With Quote