Given:
And the command line:
java Regex2 "\d*" ab34ef
What is the result?
A. 234
B. 334
C. 2334
D. 0123456
E. 01234456
F. 12334567
G. Compilation fails
KS + BB 2006
Now I read this as find digits 0 to many, so that would match 34. Start() prints the start position of where the match is (2) and group prints what it's matched (34). So I get the answer A. 234
But the answers at the back say E. 01234456! How? I don't understand.