string js substring regex code example
Example 1: js string to regex
const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
Example 2: regex to get part of word nodejs
/\(\{#(.*?)#\})\)/g.exec("({#test#})")[1] === "test"
const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
/\(\{#(.*?)#\})\)/g.exec("({#test#})")[1] === "test"