View Single Post
Old 01-20-2013, 06:07 AM   #6
Sunlite
Addict
Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.
 
Sunlite's Avatar
 
Posts: 206
Karma: 547516
Join Date: Mar 2008
Location: Berlin, Germany
Device: KObo Clara, Kobo Aura, PRS-T1, PB602, CyBook Gen3
I have a solution that is nearly the same as Doitsu, but also starts with the upper case to lower case conversion.

search for:
Code:
<h1>(.)(.*?)</h1>\s+<p>(.)(.*?)</p>
replace with:
Code:
<h1>\1\L\2\E<br /> \3\L\4\E</h1>
This will change
Code:
  <h1>TWO</h1>

  <p>TITLE OF CHAPTER</p>
into
Code:
<h1>Two<br /> Title of chapter</h1>
I can't think of a way to get title case for the title of the chapter without a second regex. Maybe someone else can.
Sunlite is offline   Reply With Quote