in reply to Re: Matching Exact Word
in thread Matching a Word Exactly
You are right. However, even this code may fail, if somebody misspells the country names.
It is more a linguistic problem than a pattern recognition one, and, as such, seems extraordinary difficult to tackle in a failproof way (which would require an AI, a syntaxic and contextual analysis, etc.)
However, as you mentioned, using negative look-ahead and negative look-behind assertions should allow him to avoid the most common other words.
|
|---|