Regular Expression
Posted: Mon Nov 24, 2014 8:31 pm
hello ,
I'm using regular expressions, but the code does not work in SwitchScripter. Follows the code.
var re = /(w+)s(w+)/;
var str = "John Smith";
var newstr = str.replace(re, "$2, $1");
job.log(3,newstr);
output -> "$2, $1"
Best Regards
Marcelo Pedrazzani
I'm using regular expressions, but the code does not work in SwitchScripter. Follows the code.
var re = /(w+)s(w+)/;
var str = "John Smith";
var newstr = str.replace(re, "$2, $1");
job.log(3,newstr);
output -> "$2, $1"
Best Regards
Marcelo Pedrazzani