Hi
I have a pretty trivial question, but its slightly tricky. I need to search for the word 'error' in a file. But this word needs to start on a word boundary and also end in a word boundary i.e. something like ' This is an errorVariable.' should not be matched. But something like 'This is an error.' should be matched. I know i can use something like: if ( /\berror\b/i ) But the problem with this is it also matches patterns like : 'Sendind error.xls.txt to the file' Such a pattern should not be matched as the word error does not end on a word boundary.
Could anybody suggest a way for this pattern matching.
Thanks!