View Single Post
Old 12-09-2010, 10:35 AM   #535
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by MrsJoseph View Post
Thanks, Manichean! (Hey, my tutorial I found was written by you!)
Yes, that's been known to happen.

Quote:
Originally Posted by MrsJoseph View Post
The string in the space beside the wand (before clicking): (?i)(?<=<hr>)((\s*<a name=\d+></a>((<img.+?>)*<br>\s*)?\d+<br>\s*.*?\s*)|(\s*<a name=\d+></a>((<img.+?>)*<br>\s*)?.*?<br>\s*\d+))(?=<br>)
That seems to be the standard expression calibre uses when you do not provide a custom one. It gets automatically filled into the regex field.

Quote:
Originally Posted by MrsJoseph View Post
The header inside the file (after clicking the wand): <br>
5 <br>
<hr>
<A name=6></a><i>Delphine Dryden </i><br>

and

6 <br>
<hr>
<A name=7></a><i>When in Rio </i><br>
That's the stuff we need. Now, looking at your expression
Code:
(<A name=\d+>\s*</a>)(<i>author name </i><br>|(<A name=\d+>\s*</a>)(<i>book name </i><br>)
the part describing the <a name>- tag should be correct. There seem to be some mismatched parentheses in the next part- the one you open just before the <i> tag never gets closed. Also, obviously, you'd need to replace the string "author name" and "book name" by the actual author and book names. Personally, I'd suggest using
Code:
<A name=\d+></a><i>[a-zA-Z ]+</i><br>
For the footer, you used
Code:
(\d+ <br> <hr>)
I see no linebreak in that expression, but there is one in the markup. Try using
Code:
\d+\s+<br>\s+<hr>
Manichean is offline