You need to read perldoc perlre more carefully. `error.xls.txt' definately does match /\berror\b/i because a word boundary (as matched by \b) is a transition between a character that matches \w and something that matches \W. You've got an impedence mismatch between what you're considering a word and word boundary and what the regexp engine thinks they are. In this specific instance you probably could catch it with /\berror\b(?!\.\w+)/i, which would rule out error followed by `.extension' or `.txt' (as examples).
In reply to Re: Pattern Matching
by Fletch
in thread Pattern Matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |