MatchesXsLong🔗

Type: Pattern verification
Check that text conforms to the pattern of an xs:long.
text🔗
Text to be checked
Return🔗
True if the text conforms to the pattern

Code

long_rep = r"[\-+]?0*[0-9]{1,20}"

pattern = f"^{long_rep}$"
return match(pattern, text) is not None