How to remove `//<![CDATA[` and end `//]]>` with javascript from string?

后端 未结 3 1136
一个人的身影
一个人的身影 2021-01-17 18:40

How to remove // and end //]]> with javascript from string?

var title = \"

        
3条回答
  •  梦毁少年i
    2021-01-17 19:04

    You ought to be able to do this with a regex. Maybe something like this?:

    var myString = "";
    var myRegexp = //;
    var match = myRegexp.exec(myString);
    alert(match[1]);
    

提交回复
热议问题