如何使用匹配表达式的更改值作为 PhpStorm 中的替换值?
How to use an altered value of a matched expression as replace value in PhpStorm?
我有一些 CSV 数据,我想在其中对一些数字进行反双引号。
示例数据
("string", "34", "some other string"),
("foo", 27, "even more strings!"),
("bar", "11", "one more for luck..")
为此我做了这个表达:
"[0-9]"
显示 67 场比赛。但是,我不知道如何用不带引号的值替换匹配项。
我想尝试 $i
,但那会用文字 $i 值替换 "numbers"。
PhpStorm regex ref. guide and find and search reference 似乎没有为非字符串相关的正则表达式替换提供太多信息,所以我如何使用 [= 去除与特定模式 ("[0-9]"
) 匹配的双引号值14=] + R
在 PhpStorm 中?
搜索:"(\d+)"
替换为:
我有一些 CSV 数据,我想在其中对一些数字进行反双引号。
示例数据
("string", "34", "some other string"),
("foo", 27, "even more strings!"),
("bar", "11", "one more for luck..")
为此我做了这个表达:
"[0-9]"
显示 67 场比赛。但是,我不知道如何用不带引号的值替换匹配项。
我想尝试 $i
,但那会用文字 $i 值替换 "numbers"。
PhpStorm regex ref. guide and find and search reference 似乎没有为非字符串相关的正则表达式替换提供太多信息,所以我如何使用 [= 去除与特定模式 ("[0-9]"
) 匹配的双引号值14=] + R
在 PhpStorm 中?
搜索:"(\d+)"
替换为: