更新时间:2023-02-18 09:14:52
为了在结果字符串中使用 $
,请使用 $$
as $
在JavaScript正则表达式和字符串替换
中有特殊含义>方法: https://developer.mozilla.org/en/ JavaScript / Reference / Global_Objects / String / replace#Specifying_a_string_as_a_parameter
In order to use $
in resulting string, use $$
as $
has special meaning in JavaScript Regular Expressions and String replace
method: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter