I am trying to get at least three words separated by two commas.I have so far managed to match two words with one comma with
/([A-z]|[0-9])(,{1})([A-z]|[0-9])/
but how can I add a comma and a word to this.I have tried repeating the same but did not work.
/^(?:\w+,){2,}(?:\w+)$/This will get you a comma separated list of at least 3 words ([a-zA-Z0-9_]+).
/^\s*(?:\w+\s*,\s*){2,}(?:\w+\s*)$/This is a slightly more user-friendly version of the first, allowing spaces in between words.