Thread: Regex Question
View Single Post
Old 01-26-2011, 07:44 AM   #4
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 Archon View Post
I am doing this with an regex enabled text editor for the moment to actually learn regex before I have Calibre do it for me and to better understand what exactly Calibre is doing under the hood so I can tweak it if I have to before cutting Calibre loose on multiple documents.
Be aware, though, that the editor may actually use a different "dialect" for its regular expressions than the Python flavour Calibre uses. For example, I used to test my expressions on Notepad++ and got quite confused about multiline matching, until I found out that the regex lib they used in Notepad++ doesn't support multiline matching.
Also, keep in mind that the search & replace in Calibre takes place on the XHTML interstage Calibre generates during conversion, so you'd obviously need to use HTML then.
Manichean is offline   Reply With Quote