Example with Taiwan ID
Taiwan ID - zh_TW
Taiwan National ID Card Number is a ten-digit code with the first an alphabetic letter followed by a nine-digit numeric string. The structure of the Taiwanese ID card is as follows:
First character: A letter indicating the individual's original household registration location. The letter corresponds to the local administrative area where the person's household registration was initially recorded.
Following nine characters: A combination of numbers that form a unique identification number. The format varies based on the generation of the ID card, and there have been different formats used throughout history.
The alphabetic letter is the area code of the municipality/county/city in which the individual applies for household registration. The leading number represents gender: “1” for males and “2” for females. The last number is a check digit.Pattern for using Taiwan ID Regex : Pattern: ^[A-Z]{1}[1-2]{1}[0-9]{8}$
^asserts the start of the string.[A-Z]{1}matches exactly one uppercase letter at the beginning of the ID.[1-2]{1}matches exactly one digit either 1 or 2, which represents the gender indicator in the ID.[0-9]{8}matches exactly eight digits following the gender indicator.$asserts the end of the string.
The Assign Semantics field provides a list of options in a dropdown menu (e.g. Date, Address, Phone Number, etc.) that can be selected to assign meaning or context to the data values in the selected table columns.
From the dropdown menu in the "Assign Semantics" field, the option "Regex" is selected to assign a regular expression pattern to the data. By assigning a regex pattern, users can enforce validation or perform pattern-matching operations on the data to ensure its consistency.
After clicking on "Add a New Pattern," a new popup window will appear, prompting you to fill in the fields for "Strategy" and "Regex Pattern."
The "Strategy" field refers to the approach or method you want to apply for the assigned semantic category.
The "Regex Pattern" field is where you enter the actual regular expression pattern that defines the desired pattern or format for the data. The pattern used for Taiwan ID Regex : ^[A-Z]{1}[1-2]{1}[0-9]{8}$
Once you have entered the strategy and regex pattern, you can proceed by clicking on the Save button to save and add the new pattern to the assigned semantic category.
After clicking on "Save," a popup message will appear confirming that the strategy has been successfully added.
Last updated