Hi all
Came about this old post:
Quote:
Originally Posted by Perkin
If all of the chapters contain exactly the same
Code:
<p class="calibre10"><span class="calibre8 bold calibre11 calibre8">
and then the chapter number followed by
then search for (regex, minimal)
Code:
<p class="calibre10"><span class="calibre8 bold calibre11 calibre8">(\d+)</span></p>
replace
Code:
<h2>Chapter \1</h2>
|
I thought this could save me a lot of time cleaning up an epub document. Didn't know about regex, so I gave it a try.
I want to replace <i class="calibre2">words</i> by <em>words</em)
So I searched for <i class="calibre2">(\w+)</i> and replaced it with <em>\1</em>
That worked fine when there was only one word between > <. But when there are more: <i class="calibre2">two words</i>, my seach doesn't find them.
Does w+ only search 1 word? How do I get it to search for any number of words? Do I change the \1 in the replace with * or something else?
Thanks in advance!
JLius