小编Ken*_*oku的帖子

使用正则表达式 powershell 匹配两个逗号之间或 ," 和 " 之间的所有字符

使用 powershell 正则表达式 我希望它找到两个逗号之间或 ," 和 ", 之间的第一个匹配项

例子:

"0x00000000","What do you want to eat? fish, meat or\n eggs?",""
"0x00030002","What do you want to eat?",""
0x00030002,What do you want to eat?,
Run Code Online (Sandbox Code Playgroud)

我希望它变成:

What do you want to eat? fish, meat or eggs?
What do you want to eat?
What do you want to eat?
Run Code Online (Sandbox Code Playgroud)

我尝试了这段代码,但它的行为不正确:

(?<=,"|\?<=,).*(?=",.*?|\?=,.*?)

regex csv powershell

2
推荐指数
1
解决办法
401
查看次数

标签 统计

csv ×1

powershell ×1

regex ×1