Javascript – Capturing all groups in a comma separated list
I am trying to use a regex to match a list of elements separated by a comma in JavaScript. The regex I use is the following: ([a-z]+)(?:,([a-z]+))*, but I am not able to get all the matched groups, only the…