In javascript regular expressions, you can put in a 'g' modifier for global, and 'm' for multiple. What's the difference between them, or are they the same thing?
m does not stand for "multiple", but for "multiline". And it makes ^ and $ match at line beginnings and line endings, respectively (instead of just the beginning and ending of the string).
Well, and g really means "global", so that the regex engine continues to find further matches after the first one.
Further reading about regex modifiers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With