使用Regex删除CSV文件中引号之间的多个逗号
全部!CSV文件中带有包含一个或多个逗号的双引号内的文本,我想知道是否存在Notepad ++的正则表达式表格,该表格可以删除CSV文件中的任意数量的逗号.
all! Have CSV files coming in with with text inside double quotes that contain one or more commas and I am wondering if there is a regex form for Notepad++ that would remove any number of commas inside a CSV file.
例如,我需要从此开始:
For example I need to go from the this:
text,text1,"interesting, text,"
对此:
text,text1,"interesting text"
引号内可以有1,2个或更多逗号.
There can be 1,2 or more commas inside the quotes.
有人知道一种使用记事本++中的正则表达式来实现此目的的方法吗?
Anyone know a of a way to make this happen using regex form in Notepad++?
提前谢谢!
使用此模式
,(?!(([^"]*"){2})*[^"]*$)
,什么也不要替换
它正在寻找逗号
,在字符串的末尾看不到可选的双引号"
的偶数
and replace with nothing
it is looking for a comma ,
that does not see an optional even number of double quotes "
to the end of the string