How to match multiple occurrences of a substring

To match multiple times use to need use the global option

str.match(/your_expression_here/g)
                                ^

Leave a Comment