开发者

javascript pattern replacement using backreference is not working

string.replace(/([\开发者_如何学Pythont])/g,"\\$1")

is working fine where

string.replace(/([\n])/g,"\\$1")

is not working!!!

any idea please???

N.B.

string.replace(/\n/g,"\\\n")

is also working fine


Use a script to capture the enter keypress event and replace it with '\' prior to submission.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜