js regex match example boolean
Example: javascript boolean regex match
//RegExp.prototype.test()
str = 'ok';
regex = /ok/;
console.log(regex.test(str)) // => true
//RegExp.prototype.test()
str = 'ok';
regex = /ok/;
console.log(regex.test(str)) // => true