/
(?:(?<=^)|(?<=,)) # start of line or comma
(?:(?!$)\s)* # skip whitespace
"? # skip opening quote mark
(
(?<=").*?(?=") # capture value in quotes
| # or
((?!,)\S)* # capture just value
)
"? # skip closing quote mark
(?:(?!$)\s)* # skip whitespace
(?=$|,) # command or the end of the line
/
gmx