MatchesXsHexBinary🔗
Check that
text conforms to the pattern of an xs:hexBinary.
Code
hex_binary = r"([0-9a-fA-F]{2})*"
pattern = f"^{hex_binary}$"
return match(pattern, text) is not None