const regex = /(?<=Hyperlink" href=")((http)(.+?)(\"|').*?)/gm;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('(?<=Hyperlink" href=")((http)(.+?)(\\"|\').*?)', 'gm')
const str = `<td style="vertical-align: top; width: 375px"><h1 id="H_67e23f29-bb69-46eb-b15c">00 - <a class="Hyperlink" href="http://xxxx.xxxxxxx.com/Management/HyperlinkLoader.aspx?HyperlinkID=c64b7052-4229-4169-b8a2" class="Hyperlink" onmouseover="HyperlinkLoader.showTooltip(event,'c64b7052-4229-4169-b8a2')" onclick="HyperlinkLoader.followHyperlink(event,{'HyperlinkID':'c64b7052-4229-4169-b8a2','ReturnURL':''});return false">Algemeen</a></h1></td>
<td style="width: 292px; vertical-align: top; background-color: rgb(255, 255, 255); text-align: left"><a class="Hyperlink" href="http://xxxx.xxxxxxx.com/Management/HyperlinkLoader.aspx?HyperlinkID=29517117-26ce-4004-88ed" class="Hyperlink" onmouseover="HyperlinkLoader.showTooltip(event,'29517117-26ce-4004-88ed')" onclick="HyperlinkLoader.followHyperlink(event,{'HyperlinkID':'29517117-26ce-4004-88ed','ReturnURL':''});return false">Asbestbeheersplan</a></td>
<td style="vertical-align: top; width: 375px"><h1 id="H_f534b7b2-a8f5-41b0-9aa8">01 - <a class="Hyperlink" href="http://xxxx.xxxxxxx.com/Management/HyperlinkLoader.aspx?HyperlinkID=7af55197-d865-4cb2-bb9c" class="Hyperlink" onmouseover="HyperlinkLoader.showTooltip(event,'7af55197-d865-4cb2-bb9c')" onclick="HyperlinkLoader.followHyperlink(event,{'HyperlinkID':'7af55197-d865-4cb2-bb9c','ReturnURL':''});return false">Voor werken geldende voorwaarden</a></h1></td>`;
// Reset `lastIndex` if this regex is defined globally
// regex.lastIndex = 0;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions