Quote:
Originally Posted by Turtle91
Code:
search: <body>\s*<p>Chapter (.*?)</p>
replace: <body>\n<h1>Chapter \1</h1>\n
|
Omigod, you guys are fabulous!
I'm trying to learn regex, but it's been slow going as regex tends to make my brain curl up into a fetal ball and start whimpering.
Finding the chapter headings hasn't been a problem. I search: <p class="chapterHead"> replace: <h1 class="chapterHead">
But then I would go in and manually change each closing </p> tag to an </h1> Urgh.
I've tried search: <p class="chapterHead">.*?</p> replace <h1 class="chapterHead">.*?</h1> but that had unhappy results.

Turtle91 for the proper regex to automate the entire process!