I have a string group like ("hello", "hi", "how r u", "how are you", "how r you", "how are u", etc.) and i want to create a function that can compare a string varible (like $varible = "Helloooo") with string group. Regex or any method is useful to me.
String can be more but can not be missing for example:
Hello = should be true
Helloooo = should be true
How r youuu !!!! = should be true
hell = should be false
w are y = should be false
heey hello = should be true
heeeey hello bro = should be true
I'm talking about this string group ("hello", "hi", "how r u", "how are you", "how r you", "how are u", etc.)
I say "string group" because type doesn't have to be an array but it also may be an array. As i said any method is useful to me.
Thanks for you support.