import re
def checkNum(s):
	first = ''
	if s == '0':
		return True
	m = re.match(r'\d+$', s) # The string must be all digits
	if m:
		lim = ''
		for i, n in enumerate(s):
			lim = lim + n
			if re.match(r'{0}\d{{{0}}}$'.format(lim), s):
				return True
			elif int(s[0:i+1]) > len(s[i+1:]):
				return False

print(checkNum('3123'))         # Meets the pattern (123 is 3 digit chunk after 3)
print(checkNum('1234567'))      # Does not meet the pattern, just 7 digits
print(checkNum('100123456789')) # Meets the condition, 10 is followed with 10 digits
print(checkNum('9123456789'))   # Meets the condition, 9 is followed with 9 digits