Let\'s say I have the string
\"12345\"
If I .match(/\\d{3}/g), I only get one match, \"123\". Why don\'t I get
.match(/\\d{3}/g)
\"123\"
When an expression matches, it usually consumes the characters it matched. So, after the expression matched 123, only 45 is left, which doesn't match the pattern.
123
45