const regex = /class=\"kick_t_dt\".+?(.+?)<\/span> <span class=\"kick_t_ko\".+?(.+?)<\/span>.+?(.+?)href=\'.+?(.+?)\/\'.+?(.+?)<\/a><\/td><td.+?(.+?)\/\'.+?(.+?)<\/a>/gm;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('class=\\"kick_t_dt\\".+?(.+?)<\\\/span> <span class=\\"kick_t_ko\\".+?(.+?)<\\\/span>.+?(.+?)href=\\\'.+?(.+?)\\\/\\\'.+?(.+?)<\\\/a><\\\/td><td.+?(.+?)\\\/\\\'.+?(.+?)<\\\/a>', 'gm')
const str = `</table>
<div class="ncet"><li class="gradient6 ncet_round c25px">Eastern - Round 1</li></div><div class="compgrp"><div id="sc2209577-1" class="scorecard" title=""></div><table class="blocks gteam team53089-1 team40896-1" onmouseover="rowOver('53089-1','40896-1')" onmouseout="resetOver()">
<tbody><tr class="even"><td class="kick_t"><span class="kick_t_dt">11.05.19</span> <span class="kick_t_ko">20:00</span></td><td class="status"></td><td class="home uc "> <a href='/soccer/usa/teams/fc-cincinnati-NTMwODk=/'>FC Cincinnati</a></td><td class="score"> - </td><td class="away uc "><a href='/soccer/canada/teams/montreal-impact-NDA4OTY=/'>Montreal Impact</a> </td>
<td class="halftime">-</td>
<td class="fav"></td><td class='fav'></td><td class="fav"><span id="m2209577-1" class="spriteCCCCCC c42px ui-icon-plus-game matchbox" title=""></span></td></tr></tbody></table></div><div class="splitter"></div><div class="ncet"><li class="gradient6 ncet_round c25px">Western - Round 1</li></div><div class="compgrp"><div id="sc2209578-1" class="scorecard" title=""></div><table class="blocks gteam team10751-1 team9956-1" onmouseover="rowOver('10751-1','9956-1')" onmouseout="resetOver()">
<tbody><tr class="odd"><td class="kick_t"><span class="kick_t_dt">11.05.19</span> <span class="kick_t_ko">21:00</span></td><td class="status"></td><td class="home uc "> <a href='/soccer/usa/teams/fc-dallas-MTA3NTE=/'>FC Dallas</a></td><td class="score"> - </td><td class="away uc "><a href='/soccer/usa/teams/new-york-red-bulls-OTk1Ng==/'>New York Red Bulls</a> </td>
<td class="halftime">-</td>
<td class="fav"></td><td class='fav'></td><td class="fav"><span id="m2209578-1" class="spriteCCCCCC c42px ui-icon-plus-game matchbox" title=""></span></td></tr></tbody></table></div><div class="splitter"></div><div class="ncet"><li class="gradient6 ncet_round c25px">Eastern - Round 1</li></div><div class="compgrp"><div id="sc2209579-1" class="scorecard" title=""></div><table class="blocks gteam team29401-1 team36415-1" onmouseover="rowOver('29401-1','36415-1')" onmouseout="resetOver()">
<tbody><tr class="even"><td class="kick_t"><span class="kick_t_dt">11.05.19</span> <span class="kick_t_ko">22:00</span></td><td class="status"></td><td class="home uc "> <a href='/soccer/usa/teams/toronto-fc-Mjk0MDE=/'>Toronto FC</a></td><td class="score"> - </td><td class="away uc "><a href='/soccer/usa/teams/philadelphia-union-MzY0MTU=/'>Philadelphia Union</a> </td>
<td class="halftime">-</td>
<td class="fav"></td><td class='fav'></td><td class="fav"><span id="m2209579-1" class="spriteCCCCCC c42px ui-icon-plus-game matchbox" title=""></span></td></tr></tbody></table></div><div class="splitter"></div><div class="ncet"><li class="gradient6 ncet_round c25px">Western - Round 1</li></div><div class="compgrp"><div id="sc2209580-1" class="scorecard" title=""></div><table class="blocks gteam team9955-1 team49517-1" onmouseover="rowOver('9955-1','49517-1')" onmouseout="resetOver()">
<tbody><tr class="odd"><td class="kick_t"><span class="kick_t_dt">11.05.19</span> <span class="kick_t_ko">23:00</span></td><td class="status"></td><td class="home uc "> <a href='/soccer/usa/teams/los-angeles-galaxy-OTk1NQ==/'>Los Angeles Galaxy</a></td><td class="score"> - </td><td class="away uc "><a href='/soccer/usa/teams/new-york-city-fc-NDk1MTc=/'>New York City FC</a> </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