Learn the basics of regular expressions and their use when managing tax information in your organization
Regular expressions are a method you can use to limit what information input can be validated by the Services add-in.
Using regular expressions will help you eliminate user errors when filling out important custom properties in the Services add-in and ensures that there are no invalid custom property entries in your Services settlement data.
Setting up custom regular expressions can be very technical and may require help from your IT department. We recommend the use of this tool when trying to create a custom regular expression.
Examples of common regular expressions:
The regex for a Danish CVR/VAT number: DK[0-9]{8}
- The regex DK[0-9]{8} specifies that the input must start with "DK" and then be followed by 8 digits from 0 to 9.
The following example values are valid:
DK00013412
DK13234212
DK66664542
The following example values are invalid:
DK0007
DK-00093421
DK 34344321
UK23242123
The regex for a UK CVR/VAT number: GB[0-9]{3}[[:blank:]][0-9]{4}[[:blank:]][0-9]{2}
- The regex GB[0-9]{3}[[:blank:]][0-9]{4}[[:blank:]][0-9]{2} specifies that the input must start with "GB", then be followed by 3 digits from 0 to 9, followed by a space, followed 4 digits from 0 to 9, followed by another space followed by 2 digits from 0 to 9.
The following example values are valid:
GB123 4567 89
GB999 9999 99
GB000 0000 01
The following example values are invalid:
GB0007
BG-00093421
DK343 4432 11
UK23242123