Build, test, and debug regular expressions
This regular expression is designed to parse comma-separated values (CSV) or similar lists. It captures items enclosed in double quotes (ignoring commas inside) and unquoted items that do not contain commas. It also trims leading and trailing whitespace around the items and matches an optional trailing comma. The global flag ensures it matches all occurrences in the target string.