I'm looking for a function if available to match a whole word for example:
std::string str1 = "I'm using firefox browser";
std::string str2 = "The quick brown fox.";
std::string str3 = "The quick brown fox jumps over the lazy dog.";
Only str2
and str3
should match for the word fox
. So, it doesn't matter if there is a symbol like period (.) or a comma (,) before or after the word and it should match and it also has to be case-insensitive search at the same time.
I've found many ways to search a case insensitive string but I would like to know something for matching a whole word.