View Single Post
Old 01-28-2011, 07:26 AM   #11
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80520
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Okay, I finished testing this. (I used Python directly, not Calibre, but since I used the exact same function, the results should be the same.)
Use this search pattern:
Code:
(?s)\*\s*(?P<text>[^*]*?)\s*\*\s*(?P<footnote>[^<]*)
The replacement pattern is:
Code:
(\g<footnote>) \g<text>
I made the same assumptions as in my earlier post.

Quote:
Originally Posted by schuster View Post
have you any idea to make an expression work with 2 or more footnotes too??
have a little library with tech-books and science, where will be more than one footnote .
Post relevant examples of the HTML, and I'll see what I can do.
Manichean is offline   Reply With Quote