I am trying to understand how the below regular expression is working.
,(?=([^\"]\"[^\"]\")[^\"]$)
Expression matches all the commas that are not enclosed in quotes.
For example:
data,data,data",with"quote,data",with"quote,data
will create following tokens
data, data, data",with"quote, data",with"quote, data
if i remove $ at the end of the regex expression, it matches all commas(including commas withing quotes). Will be helpful if someone can provide details how this is matching all commas if we remove the $ from the end of regex expression.
Will be helpful if someone can provide information why removing $ from the end of regex matches all commas.