Registration and License Formats
Regular expressions are pattern matching rules, and Determination uses them to evaluate whether certain types of tax configuration or transaction data matches a particular format (mask). For example, some tax authorities mandate registration formats by specifying masks.
You can see a list of all registration masks currently in Determination, with an explanation of the format, and see examples of each. See Determination Registration Masks, in the Knowledge Base, for more information.
The following table lists common meta-characters used in Determination authority registration masks (for a more detailed list, see the link in the note above). If you create license masks, or registration masks for your custom authorities, you can also use standard regular expressions not listed here (such as + and ?). A registration mask may include up to 100 characters.
Character |
Definition |
---|---|
\ |
Either of the following:
|
^ |
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 nine 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 nine digits. |
| |
The pipe symbol enables a match to either the string to the right or to the left of the pipe. 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}) |
A number of the preceding character to match. For example, ZZ\d{9} indicates ZZ followed immediately by nine digits. |
[xyz] |
A character set. Matches any one of the enclosed characters. You can specify a range of characters by using a hyphen. For example, EU[ab]$ matches EUa or EUb. |
The following shows the registration validation expression for Germany. Germany requires a nine-digit registration number preceded by DE, Germany's EU country code. For example, DE123456789. Alpha characters are disallowed in the string:
^DE\d{9}$ |
For example: DE123456789. |