Javascript Regular Expressions Test()
Test()
// Testing to see if a pattern match will be found. let myRegexp = /Java(Script)?/g; let myString = "Both Java and JavaScript share the same name, but are quite different."; console.log( myRegexp.test(myString) ); // true