Uniform Type Identifiers (UTIs) are the modern method to identify file types on Mac OS X. In Apple's documentation it says:
A UTI is defined as a string (CFString) that follows a reverse Domain Name System (DNS) convention.
However, the UTI-related functions in LaunchServices do not provide any method to validate a UTI, i.e. check whether a given string is a UTI and conforms to the UTI string format (i.e. uses only legal characters, etc.).
The Wikipedia page on UTIs says:
UTIs use a reverse-DNS naming structure. Names may include the ASCII characters A-Z, a-z, 0-9, hyphen ("-"), and period ("."), and all Unicode characters above U+007F.[1] Colons and slashes are prohibited for compatibility with Macintosh and POSIX file path conventions.
What would a regex to validate a UTI look like?