MatchesXsDouble🔗

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

Code

doubleRep = (
    '((\\+|-)?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)([Ee](\\+|-)?[0-9]+)?|-?INF|NaN)'
)
pattern = (
    f'^{doubleRep}$'
)
return match(
    pattern,
    text
) is not None