... if(not $test_string =~ /$regex/) { ... } ...
It's basically a question of operator precedence.
To make your intentions clearer, you should probably use the '!~' operator:
... if($test_string !~ /$regex/) { ... } ...
In reply to Re: regular expressions with !
by ozone
in thread regular expressions with !
by egunnar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |