in reply to Pattern Matching
It looks like your definition of a word boundary differ from Perl's. For Perl a word is [a-zA-Z0-9_], so the . is not a word character, so the regexp engine finds a word boundary between error and .
If you want to match "This is an error." but not "error.xls.txt" you're going to have to code it yourself.
I don't see any sure way to do this but /\berror\b(?!\S\w)/ (error, then a word boundary then a non space character then a word character) should work _most_ of the time.
I am not sure I would trust a program here, if you really want 100% accuracy you're probably better off finding a way to log and check the matches, if only so that you can fix your regexp when you find out it failed.
|
|---|