Thread: Regex examples
View Single Post
Old 06-05-2012, 02:59 PM   #73
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
You don't say what the original Chapter One looks like in code view. Just the text isn't sufficient to make sure the find/replace is correct.

Assuming you have
Code:
<p>Chapter SOMETHING</p>
and want
Code:
<h1>Chapter SOMETHING</h1>
then
Code:
Find:    (?sU)<p>Chapter (.*)</p>
Replace: <h1>Chapter \1</h1>
might get you what you want.
meme is offline   Reply With Quote