View Single Post
Old 05-01-2010, 09:54 PM   #25
prky
Member
prky began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Nov 2009
Device: IPhone 3GS
Quote:
Originally Posted by pepak View Post
I am not surprised. I told you not to use ^ and $.
Cheers for that.

Following your suggestions, I looked up the behaviour of ^ and $ in python when using multi-line regex, and found that whilst they do also apply to the start / termination of a string, they also still apply to the start / end of a line.

In combination with the s attribute (which makes .* match across multiple lines) and the suggestion of .*? (for a minimalist match), I had a regex which worked in the python tester.

The bit I was missing was that I wasn't testing each regex on the conversion each time, as I was using the highlighting in the regex builder to see if it was matching.

Thanks for your assistance.

prk.
prky is offline   Reply With Quote