Given the following data, I'd like a Regex to pull out each comma-separated value. However, a double-quoted value may contain commas.
"SMITH, JOHN",1234567890,"12/20/2012,11:00",,DRSCONSULT,DR BOB - OFFICE VISIT - CONSULT,SLEEP CENTER,1234567890,,,"a, b"
"JONES, WILLIAM",1234567890,12/20/2012,12:45,,DRSCONSULT,DR BOB - OFFICE VISIT - CONSULT,SLEEP CENTER,,,,
Here's the expression that I have so far:
(?<=^|,)(?:(?:(?<=\")([^\"]*)(?=\"))|(?:(?<![\"])([^,\"]*)(?![\"])))(?=$|,)
The double-quoted values are not being matched. What am I doing wrong? (This Regex is passed into pre-existing code - I cannot rewrite the system.)