Registration and license formats

Some tax authorities mandate registration and/or license formats by specifying masks.
Determination uses regular expressions, which are pattern matching rules, to evaluate whether certain types of tax configuration or transaction data match a particular format (referred to as a mask).
This table lists common meta-characters used in Determination authority registration masks. You can create registration and/or license masks for your custom authorities. If you create masks for custom authorities, you can also use standard regular expressions (such as + and ?), which aren't listed in the table.
A registration mask can include up to 100 characters.
Character
Definition
\
Indicates one of the following:
  • For characters that are usually treated literally, a backslash (\) indicates that the next character is special. For example, d matches the character, d. By placing a backslash in front of d (\d), the character becomes special (match a digit).
  • For characters that usually have special meaning, a backslash (\) indicates that the next character should be interpreted literally. For example, an asterisk (*) is a special character that means zero or more occurrences of the preceding character should be matched. For example, a* means match zero or more a characters. To match an asterisk literally, precede the asterisk with a backslash. For example, a\* matches a*.
^
Indicates the beginning of the license or registration mask. For example, ^DE indicates that the license or registration must begin with DE.
\d
Indicates a digit. Often used in conjunction with the {n} expression to indicate a number of digits. For example, \d{9} indicates 9 digits.
\s
Indicates a hard space. For example, AT\sU indicates the string, AT U.
$
Indicates the end of the license or registration mask. For example, \d{9}$ indicates that the license or registration must end with 9 digits.
|
Enables a match to either the string to the right or to the left of the pipe symbol (|). For example, ^ZZ\d{9}$|^EU$ indicates that a valid registration or license could be either ZZ123456789 (or ZZ plus any combination of nine digits) or EU.
{n} (example: {2})
Indicates a number of the preceding character to match. For example, ZZ\d{9} indicates ZZ followed immediately by 9 digits.
[xyz]
Indicates a character set and matches any one of the enclosed characters. For example, >EU[ab]$ matches EUa or EUb. You can specify a range of characters using a hyphen.
This table includes the registration validation expression for Germany. Germany requires DE (the EU country code for Germany) followed by a 9-digit registration number. Alpha characters are disallowed in the string.
Registration validation expression
Explanation
^DE\d{9}$
  • ^ means the beginning of the string.
  • DE is the EU country code for Germany.
  • \d indicates a digit.
  • {9} means that there must be nine digits.
  • $ means the end of the string.


For example, DE123456789 is a valid number format for Germany.