开发者

replace double semicolo

开发者 https://www.devze.com 2023-03-02 18:22 出处:网络
I could not replace double semicolon into 2\'s double qu开发者_运维百科ote. result = original_text.replace(\";;\", \';\"\";\');

I could not replace double semicolon into 2's double qu开发者_运维百科ote.

result = original_text.replace(";;", ';"";');
result = result.replace(";;", ';"";');

What is the correct code?


Is this what you want?

var a:String = "the;;quick;;brown;;fox";
trace(a.replace(/;;/g,'""')); //Use Regular Expression

result : the""quick""brown""fox
0

精彩评论

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