I\'m new to RegEx and JavaScript and I was wondering if anyone knew what the RegEx would be for detecting whether or not an input field contained the following type of format:
(?:([\w\s]+)(?:,\s*))* would get any number of tags separated by commas.
(?:([\w\s]+)(?:,\s*))*
(?:([\w\s]+)(?:,\s*)){n} would match n tags where n is an integer.
(?:([\w\s]+)(?:,\s*)){n}
(?:([\w\s]+)(?:,\s*)){0,n} would match 0 to n tags where n is an integer.
(?:([\w\s]+)(?:,\s*)){0,n}
In order to count the tags, you'll need to check the number of captured groups.