Open utterances-bot opened 2 years ago
I did this and got inconsistent results, might be some js bug. When running the code in developer tools I get: [RegExpStringIterator] however, running it in the console manually, I get: [Array(1), Array(1), Array(1)]
How to Convert a RegExpStringIterator to An Array in JavaScript - Weekly Webtips
If are using String.matchAll in JavaScript, you get back a RegExpStringIterator, which you can loop through to get back the results. You can do this simpler
https://www.webtips.dev/webtips/javascript/how-to-convert-a-regexpstringiterator-to-an-array-in-javascript