且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 WebStorm/PhpStorm 中用正则表达式替换

更新时间:2022-05-20 09:17:54

您不需要任何反向引用,就像您使用它们的方式一样.

You do not need any backreferences the way you are using them.

这是您可以使用的正则表达式:

This is the regex you can use:

\#\{(\w+)\}

替换应该是

{{$1}}

当您使用 \$ 时,使用的是文字 $,而不是实际的反向引用.

When you use \$, a literal $ is used, not the actual back-reference.

正则表达式演示