JS Exec против Match

/*
The main difference between string.match and regex.exec is,
the regex object will be updated of the current match with
regex.exec call.
For example,
*/

var myString = "[22].[44].[33].", myRegexp = /\d+/g, result;

while (result = myRegexp.exec(myString)) {
    console.log(result, myRegexp.lastIndex);
}
simondoesstuff