pydicom.uid.RE_VALID_UID

pydicom.uid.RE_VALID_UID = re.compile('^(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))*$')[source]

Regex for a valid UID