Nigel Peck wrote:
Just a quick question about ^ and $ in regexes when using /m.
Will they match next to any embedded newline characters? i.e. \015\012,
\015 and \012 or will they only match next to the same newline that \n
will match? i.e. platform specific
What happened when you tried it?
C:\home>type test.pl
$LF = "\012";
$_ = "abc${LF}def${LF}ghi${LF}";
print "[$_]\n" for /^.+$/gm;
C:\home>test.pl
[abc]
[def]
[ghi]
So that would indicate that they match next to any newline like
character, independent of platform.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/