My sample string is
Indian India's India.
I want to match only "India" as a whole word. My regular expression is /\b(india)\b/i
.
But this is giving me 2 matches. one in "India's" and other in last word.
To avoid getting India in India's, I used this regex /\b(india)[^'a-z]\b/i
. But this regex is matching "India." (Notice the dot)
I only want to match India. How can I achieve this?
I am doing this in PHP.