I would choose a tokenizer . Set space and other elements such as commas, full stops, etc. As delimiters. And remember to compare case insensitive.
Thus, you can find โhelloโ in โHello, how does his test passโ without receiving a false positive result for โhimโ and a false negative value for โHelloโ (starts with an uppercase letter H).
source share