in reply to Need a regex..
It's unclear what you want.
If you're trying to match «a string that isn't "Select"», you want
$s !~ /^Select\z/
If you're trying to match «a string that doesn't contain "Select"», you want
$s !~ /Select/
If you're trying to match «any number of characters that don't contain the substring "Select"», you want
$s =~ /(?:(?!Select).)*/s
(This last one would normally be used as part of a larger pattern.)
is to/(?:(?!STRING).)*/s
as/STRING/
is to/[^CHAR]/
/CHAR/
|
---|
In Section
Seekers of Perl Wisdom