in reply to Re: positive regex for inverted match
in thread positive regex for inverted match
Uh, no.
That will match every string, because "bar" 0 times is the empty string, and every input matches the empty string.
laptop:~> perl -le 'print "matches" if "bar" =~ /(bar){0}/;' matches laptop:~> perl -le 'print "also matches" if "barbar" =~ /(bar){0}/;' also matches laptop:~> perl -le 'print "event this matches" if "" =~ /(bar){0}/;' event this matches
|
|---|