You are viewing a single comment's thread. Return to all comments →
Only Regex solution, no string modification except trim (which is given)
const regex = <a .*?href="(.*?)".*?>([^<].*?)<.*?; const parseAll = new RegExp(regex, "g"); const parseInv = new RegExp(regex); input.match(parseAll).forEach((str) => { const res = parseInv.exec(str); console.log(res[1] + "," + res[2].trim()); });
<a .*?href="(.*?)".*?>([^<].*?)<.*?
Seems like cookies are disabled on this browser, please enable them to open this website
Detect HTML links
You are viewing a single comment's thread. Return to all comments →
Only Regex solution, no string modification except trim (which is given)