jscript.net - Replace semicolon in Microsoft JSCRIPT -
I need to remove semicolon from the string in Microsoft JSCRIPT . I have to remove the semi colon from the string test. But this is throwing a mess I ";" I have been using the following two methods to remove > Your creates a new string variable no which is the Evidence: (This is the same result for JScript.NET 10.0.30319; WSH JScript 5.7.165 99) < / P>
var test = "{abcdef};"
1) var reg = New RegExp (";", "g") var test = test.replace (reg, " ") 2) var test = test.replace (/; / g," ");
var test = "{abcdef};"
test . To change its value and specify the result in 'one' variable,
test = test.replace (reg, "")
var test = test.replace (reg, "")
test .
JScript 10.0.30319% var t = "a; b; c;" One; B; % Var t = t.replace (/;, "") Error: Object required% var t = "a; b; c;" One; B; % T = t.replace (/; / g, "") ABC
Comments
Post a Comment