JS用正则替换特殊字符

'abcabce'.replace(/abc/g,'')
"e"
'abcabce$E$'.replace(/$E$/g,'')
"abcabce$E$"
'abcabce$$'.replace(/$/g,'')
"abcabce$$"
'abcabce$$'.replace(/\$/g,'')
"abcabce"
'abcabce$E$'.replace(/\$E\$/g,'')
"abcabce"
'abcabce$E$$E$'.replace(/\$E\$/g,'')
"abcabce"
上一篇:JavaScript 入门教程四 语言基础【2】


下一篇:android中xmlns:tools属性详解