View Single Post
Old 12-23-2010, 08:51 AM   #2
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by bremler View Post
Hello there,

I was wondering if this was possible:

<p>Chapter 1</p>

<p>SUSIE HOMEMAKER</p>

to become

<h1>Chapter 1: SUSIE HOMEMAKER</h1>


I'm stumped as to the find/replace regular expression involved, maybe it's a two-step process. Much karma for any help :-)
Sure is possible: do this...

Find: <p>(Chapter \d+)</p>\s+<p>(.*)</p>
Replace: <h1>\1: \2</h1>
Tick the Minimal Matching checkbox
kiwidude is offline   Reply With Quote