If you want to find strings that don't match a pattern, you can use the negating binding operator !~. It's nicer looking than complex patterns.
if( $string !~ m/^cat/ ) { ... }
In reply to Re: Regex negative word
by brian_d_foy
in thread Regex negative word
by zer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |