View Single Post
Old 01-19-2013, 06:44 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,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
RegEx question (again)

Cleaning a book that someone has converted through Calibre a number of times.

Mostly a lot of grunt work, but I've come across the following many times, not only in this one but many others. The chapter number is H1, so the TOC just consists of a string of numbers


So if I can save the F&R in Tools, I can use it whenever I need it

Looks like this ..

Code:
<body>
  <h1>TWO</h1>

  <p>TITLE OF CHAPTER</p>

After manually making changes (lots of trial and error), this seems to work best

Code:
<body>
  <h1>TWO<br />
  TITLE OF CHAPTER</h1>

or if I could be even more clever

Code:
<body>
  <h1>Two<br />
  Title Of Chapter</h1>

Paul
phossler is offline   Reply With Quote