Noticed a difference between what Rubular.com and Javascript regexes:
'catdogdogcatdog'.match(/cat(dog)/g); // JS returns ['catdog', 'catdog']
I expected to capture 'dog' twice but instead I get 'catdog' twice.
Rubular captures 'dog' twice as expected: http://rubular.com/r/o7NkBnNs63
What is going on here exactly?