替换 Json 文件中的分隔符字符串

Replace the delimiter string in Json file

我有 json 文件,其中包含分隔符值,我必须用另一个分隔符值替换分隔符 ($$....$$)。

这是输入文件

{ 参数: { "key":“$$值$$” } }

低于预期值。 { 参数: { "key":“$(价值)” } }

这个表达式,

"key"\s*:\s*"$$([^$]*)$$"

替换为

"key":"$()"

可能是一种选择。


If you wish to explore/simplify/modify the expression, it's been explained on the top right panel of regex101.com. If you'd like, you can also watch in this link, how it would match against some sample inputs.