in reply to Invert grep match with qr// variable
You could use
grep( !/$re/, @array )
grep( $_ !~ $re, @array )
What about something within the regex itself?
is effectively short for/$re/
/\G(?s:.*?)$re/
This is a form we can negate.
/\G(?!(?s:.*?)$re)/
So you could use
grep( /\G(?!(?s:.*?)$re)/, @array )
|
|---|