Is there an option to check whether the given text contains x numbers in a row?
Example:
da$ c0220 -> True
dsad458d69 -> False
I think I should use regular expressions
but I can't figure out how.
Is there an option to check whether the given text contains x numbers in a row?
Example:
da$ c0220 -> True
dsad458d69 -> False
I think I should use regular expressions
but I can't figure out how.
The regex below checks for 10 consecutive numbers
\d{10}
In Python this becomes
if re.search(r"\d{10}", subject):# Successful match
else:# Match attempt failed