more useful options | |
PerlMonks |
Re^2: Match nothing in grep { ! // }by bart (Canon) |
on Mar 14, 2013 at 12:07 UTC ( [id://1023465]=note: print w/replies, xml ) | Need Help?? |
The empty regex always matchesWell, yes, and no. // is special, it serves as a shortcut, as if it's not the first regex you match, it signifies a repeat of the last regex that matched. If 'pattern' is an empty string, the last successfully matched regex is used. In your tests here, there was no previous match, so this rule doesn't apply.
In Section
Seekers of Perl Wisdom
|
|