Splitting a string and ignoring the delimiter inside quotes

前端 未结 4 1410
轻奢々
轻奢々 2021-02-19 10:48

I am using .NET\'s String.Split method to break up a string using commas, but I want to ignore strings enclosed in double quotes for the string. I have read that a

For

4条回答
  •  长情又很酷
    2021-02-19 11:10

    A quick workaround could be pre-parse the commas inside the quotes and replace them with another delimiter, split the values and post-parse the values with the delimiter replacing it with the original commas.

提交回复
热议问题