What is the meaning of the g flag in regular expressions?
g
What is is the difference between /.+/g and /.+/?
/.+/g
/.+/
Example in Javascript to explain:
> 'aaa'.match(/a/g) [ 'a', 'a', 'a' ] > 'aaa'.match(/a/) [ 'a', index: 0, input: 'aaa' ]