regex, how to use javascript code example
Example 1: js string to regex
const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
Example 2: javascript regex match sequence
// Regular expression match sequence of characters
console.log(/abc/.test("abcde")); // true
console.log(/abc/.test("abxde")); // false