If I run this:
'121'.match(/[0-9]{2}/gi)
I get back an array with a single result:
['12']
How can I get it to return all results, even if they overlap? I want the result to be this:
['12', '21']
EDIT: Or a better example would be:
'1234567'.match(...);
should give me an array with
[12, 23, 34, 45, 56, 67]