String replace a Backslash

前端 未结 8 922
死守一世寂寞
死守一世寂寞 2020-11-27 06:50

How can I do a string replace of a back slash.

Input Source String:

sSource = \"http://www.example.com\\/value\";

8条回答
  •  星月不相逢
    2020-11-27 07:00

    This will replace backslashes with forward slashes in the string:

    source = source.replace('\\','/');
    

提交回复
热议问题