问题
I'm using Sublime Text 3 and have a CSV file with 1200 tax rates in this format:
Code,Country,State,Zip/Post Code,Rate,default
US-NY-10001-Rate 1,US,NY,10001,0.08875,
....
I need a regex to find each value separated by a comma so I can then wrap quotes around it.
Is this possible?
回答1:
Find the following regular expression (using capturing group and backreference):
([^,\n]+)
and replace it with:
"\1"

来源:https://stackoverflow.com/questions/24741214/regex-to-find-strings-separated-by-comma-and-then-add-quotes