Is there an equivalent of PHP’s preg_match_all in Javascript? If not, what would be the best way to get all matches of a regular expression into an array? I’m willing to use any JS library to make it easier.
Is there an equivalent of PHP’s preg_match_all in Javascript? If not, what would be
Share
You can use
matchwith the global modifier: