im making a simple word game with php and regex, how can we search that if a string have to require two or more words?
lets say
"cat"
"dog"
"play" x 2
if
"cat dog play play" pass
"hello a cat dog playing a play" not pass, only 1 "play"
"cat" not pass, no dog and 2x play
"i want a cat and a dog play with me and play with grandfather" pass
how can we match it with regex?