is there a meaningful difference between (?![a-z]) and (?=[^a-z])? is the former recommended?
Yes, they're different regular expression patterns that match different things. (?![a-z]) asserts "not followed by any of the characters from 'a' through 'z', which includes not being followed by any character." (?=[^a-z]) asserts "followed by a single character that is not any of the characters from 'a' through 'z'." The former is a negative assertion; the latter is a positive assertion.
In your case, (?![a-z]) is what you would want to use.
[PerlMonks posting tip: Enclose Perl code in <code></code> tags, even code within paragraphs.]
UPDATE: Removed color.
In reply to Re^3: Defining Characters in Word Boundary?
by Jim
in thread Defining Characters in Word Boundary?
by iaw4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |