View Single Post
Old 04-25-2010, 11:57 PM   #2
pepak
Fanatic
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 594
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-505
I don't know about Calibre, but usual behavior of regexp libraries in multiline mode is to match ^ at the very beginning of the whole string rather than a line. Same with $. In multiline mode, you should search for something like:

Code:
\nOrder your copy...\n
And be particularly careful with matching a dot (.), as it will match anything including newlines. Code such as .+ will match the whole document. If you really need to use the dot, and frankyly I would recommend trying something like [^\r\n] instead, at least use the ungreedy versions of + and *: +?, *?
pepak is offline   Reply With Quote