MatchesXsUnsignedByte🔗

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

Code

unsignedByteRep = (
    '(-0|\\+?0*[0-9]{1,3})'
)
pattern = (
    f'^{unsignedByteRep}$'
)
return match(
    pattern,
    text
) is not None