View Single Post
Old 04-26-2010, 04:48 AM   #4
prky began at the beginning.
Posts: 11
Karma: 10
Join Date: Nov 2009
Device: IPhone 3GS
Okay, so I can make .* match across newlines by using the s flag.

And I can test it in python to confirm it works, but it doesn't work in calibre.

If I go to and put in the regex as:

(?mis)Order your copy.*?Ancestor ~ Scott Sigler.*?$
and the String as:

Pearcy pointed to another phone, this one built into the equipment-thick control panel. </p><p>
Order your copy from on April 1: Noon Eastern Time, 9AM Pacicific</p><p>
<a href=""></a></p><p>
Ancestor ~ Scott Sigler</p><p>
“That’s a straight line to Langley. Just pick it up and it will ring through.” </p><p>
Then that regex tester reports that it's found:

# Run findall
>>> regex.findall(string)
[u'Order your copy from on April 1: Noon Eastern Time, 9AM Pacicific</p><p>\r\n<a href=""></a></p><p>\r\nAncestor ~ Scott Sigler</p><p>\r']
That's what I want it to match - so it looks like we're in business.


When I paste that exact same regex into the calibre regex builder, it doesn't highlight anything

*tears more hair out*

prky is offline   Reply With Quote