in reply to Re: How to match a ;
in thread How to match a ;
Actually no. $ matches an end of line, which may be a \n character. Consider:
my $line = ";\n"; print $line =~ /$_/ ? "" : "no ", "match: $_\n" for '^;$', '^;', "^;\\ +z";
Prints:
match: ^;$ match: ^; no match: ^;\z
Note that \z matches the physical end of the string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to match a ;
by AnomalousMonk (Archbishop) on Feb 08, 2009 at 10:20 UTC | |
|
Re^3: How to match a ;
by ELISHEVA (Prior) on Feb 08, 2009 at 10:29 UTC | |
|
Re^3: How to match a ;
by johngg (Canon) on Feb 08, 2009 at 23:13 UTC | |
by GrandFather (Saint) on Feb 09, 2009 at 00:41 UTC |