Pattern Matching Reference - PCRE REGULAR EXPRESSION DETAILS
Posted: Wed May 16, 2012 7:43 am
This issue has been a stumbling block more times than I can remember, but I always forget.
Happened again today, and it took me ages before I realized why.
When the EOLs are Unix/Amiga style, the ^ doesn't work. It works fine when the EOLs are DOS/Windows.
Not tried it for Mac style EOLs.
David
Happened again today, and it took me ages before I realized why.
The issue is this:^ assert start of string (or line, in multiline mode)
$ assert end of string (or line, in multiline mode)
When the EOLs are Unix/Amiga style, the ^ doesn't work. It works fine when the EOLs are DOS/Windows.
Not tried it for Mac style EOLs.
David