pydicom.uid.RE_VALID_UID_PREFIX

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

Regex for a valid UID prefix