1// Regular expression match sequence of characters
2console.log(/abc/.test("abcde")); // true
3console.log(/abc/.test("abxde")); // false
1// Tests website Regular Expression against document.location (current page url)
2if (/^https\:\/\/example\.com\/$/.exec(document.location)){
3 console.log("Look mam, I can regex!");
4}