3
我试图取代像一些文字:
I need the %r for the bike.
凡%r
被另一个值代替。
可以说我用$$$$
替换%r
。
var text = 'I need the %r for the bike.';
return text.replace("%r", "$$$$");
非但没有预期的结果:
I need the $$$$ for the bike.
我得到:
I need the $$ for the bike.
有我丢失的东西吗?
谢谢。我认为美元符号只是用'REGEXP'替换时才做的。 – Shawn31313 2013-03-12 00:07:54