regex - Capture numbers and strings from comma separatated value file -
i have file contains strings begins , end double quotes. each string can contain comma. numbers not begin or end double quotes. each integer , string separated comma. possible have null value.
i make groups witch each string , number. trying capture each group 1 @ time.
i have created regex, works every case unless there comma in string:
/(?:"?([^"]*)"?,){2}/u
if remove ungreedy operator, regex works every case except null values.
here example of log file:
196778,"df,fdfsdf","4.4","ds-sdads231-33","mmh",1,,,,,,,023,1,"20150,62519535ty"
Comments
Post a Comment