0

Fully matched numbers sequence
For the context of this challenge, a matched group is a digit \$n\$, followed by \$n\$ more matched groups. In the case of \$n = 0\$, that's the whole matched group.
For example, 3010200 is a valid matched group, as:
3 # 3, capturing three elements...
0 ...