in reply to Re: Match nothing in grep { ! // }
in thread Match nothing in grep { ! // }
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