Did you try to add a word boundary in your regex?
# untested quickshot $name =~ /^FOO(?!BA[RZ])\b.*$/
update1: text corrections
update2: please see Hue-Bonds reply to my post for a corrected version
In reply to Re: Zero-width look-ahead regexp question
by linuxer
in thread Zero-width look-ahead regexp question
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |