3 ms·
I like the `matchAll` feature. I now use the awesome/awful (depending who you ask) hack using `.replace`: var matches = []; "12345678".replace(/\d/g, (
by tobyhinloopen 8y ago
I like the `matchAll` feature. I now use the awesome/awful (depending who you ask) hack using `.replace`:
var matches = [];
"12345678".replace(/\d/g, (m) => matches.push(m));
console.log(matches);