The current code with regex looks very complex. As many extensions work the same way, we should have a clean example of how to do it.
This would be much simpler with string.matchAll(): https://developers.google.com/web/updates/2019/02/string-matchall
The current code with regex looks very complex. As many extensions work the same way, we should have a clean example of how to do it.
This would be much simpler with
string.matchAll(): https://developers.google.com/web/updates/2019/02/string-matchall