View Single Post
Old 01-20-2013, 03:40 AM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
The following quick and dirty regex will replace:

Code:
  <h1>TWO</h1>

  <p>TITLE OF CHAPTER</p>
with:

Code:
     <h1 title="TITLE OF CHAPTER">TWO<br />
TITLE OF CHAPTER</h1>
Find: <h1>(.*?)</h1>\s+<p>(.*?)</p>
Replace: <h1 title="\2">\1<br />\n\2</h1>

It's not perfect, but should save you some editing. (Sigil uses the title attribute for the toc.)
Doitsu is offline   Reply With Quote