regex1
var str = `Is this This`;
// var regex = new RegExp("is");
var regex = /is/gi; ///Equivalent to above
regex.test(str);
regex.exec(str) ///Returns an object containing the matched expression, the index and the original input.
regex.exec(str)
str.match(regex)
str.replace(regex, str => "XX");
str.search(regex)
This Gist was automatically created by Carbide, a free online programming environment.