View Single Post
Old 05-28-2015, 10:14 PM   #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
Q: RegEx to join chapter number and title

I have a bunch of entries with a Hx followed by the rest of the chapter title in <p> tags

Code:
<h1>Chapter 1:*</h1>
<p>The Title</p>
What I'd like is

Code:
<h1>Chapter 1: The Title</h1>
My Find was *</h1>\s*<p>(.*?)</p>

My Replace was \1</h1>

but instead of just the text up to the first </p>, all the text is selected

What am I doing wrong?
phossler is offline   Reply With Quote