It looks like you are trying to use a negated character class ([^ ... ]) to enclose your alternation of words you don't want. That will not work as character classes just deal with single characters. Perhaps something like this would be better.
my $forbidden = qr{^(?:master|model|dbccdb|sybsecurity|sybsystemdb|syb +systemprocs|tempdb|DBA)[a-zA-Z0-9_]+}; if ( $entered =~ $forbidden ) { # Your rejection code here }
I hope this is helpful.
Cheers,
JohnGG
In reply to Re: exact word match
by johngg
in thread exact word match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |