5 Einträge, 1 Seite |
QuoteIf the PATTERN evaluates to the empty string, the last success-
fully matched regular expression is used instead. In this case,
only the "g" and "c" flags on the empty pattern is honoured - the
other flags are taken from the original pattern. If no match has
previously succeeded, this will (silently) act instead as a gen-
uine empty pattern (which will always match). perlop#Regexp_Quote_Like_Operators
1 2 3 4 5 6
$\="\n"; print "b" =~ //; #1 print "a" =~ /a/; #1 print "a" =~ /b/; print "b" =~ //; print "a" =~ //; #1
Quoteman vergleiche Zeile 2 und 5!
moritz+2008-07-25 08:47:16--Was war denn die vor Zeile 2 zuletzt gematchte Regex?
Wenn du das nicht weisst ist es auch nicht sinnvoll gegen // zu matchen.
QuoteIf no match has previously succeeded, this will (silently) act instead as a gen-
uine empty pattern (which will always match).
renee+2008-07-25 07:52:12--Zum Thema "emtpy pattern" gab es letzt bei den Perl 5 Porters eine Diskussion:
http://perl.markmail.org/search/?q=empty+pattern+d...
5 Einträge, 1 Seite |