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\"
Try preg_match_all(/cat.+dog(.+play){2}/i,$str,$out);
preg_match_all(/cat.+dog(.+play){2}/i,$str,$out);