immediately consumes all characters in the string. The regex then starts backtracking to try to find a match for 6 to 8 digits. It finds such a match in the 6 digits of
. The second
in the regex then tries to match zero or more of anything and, as one would expect, finds a match. The overall successful match then terminates.