I’m trying to construct a regular expression that would match a pattern as such:
word1, word2, word3
So basically I want “, ” to appear twice and to have words between them. So far I came up with:
$general_content_check = preg_match("/^.*, .*$/", $general_content);
But this matches only “, ” several times in a string.
Can someone help me with this please?
Try