Can I generate masked values that follow a specific format?
updated at
Apply OS: Windows, macOS, Linux
Apply Navicat Product: Navicat for MySQL, Navicat for PostgreSQL, Navicat for Oracle, Navicat for SQL Server, Navicat for SQLite, Navicat for MariaDB, Navicat for MongoDB, Navicat for Snowflake, Navicat Premium
Yes. Use the Regular Expression substitution category and enter a pattern. Navicat generates values that match it. Turn on Is unique if each value must be different.
Basic syntax
| Element | Example | Generates |
| Ordinary characters | Kelly | Kelly |
| Individual characters | [AB] | A or B |
| Initial ] in a character set | []] | ] |
| [x-y] range | [0-9] | e.g. 2 or 7 |
| [chars] character set | [A-Z0-9] | e.g. 3 or M |
| [^chars] excluded characters | [^abc] | e.g. m or [ |
| * zero or more | abc* | e.g. abcc or ab |
| + one or more | abc+ | e.g. abcccc or abc |
| ? include or not | abc? | ab or abc |
| (regexp) grouping | (abc)*d | e.g. abcabcd or d |
| {num} repeat | b{4} | bbbb |
| {min,max} repeat | b{3,4} | bbb or bbbb |
| {min,} at least min repeats | b{4,} | e.g. bbbb or bbbbbbbbb |
| () empty string | () | (empty) |
| | alternatives | True|False | True or False |
| Empty alternative | th(e|is|at) | e.g. the or that |
Escapes and character classes
| Element | Example | Generates |
| Backslash | \\ | \ |
| Dot | \. | . |
| Caret | \^ | ^ |
| Dollar sign | \$ | $ |
| Left curly bracket | \{ | { |
| Right curly bracket | \} | } |
| Left square bracket | \[ | [ |
| Right square bracket | \] | ] |
| Left parenthesis | \( | ( |
| Right parenthesis | \) | ) |
| Vertical bar | | | | |
| Asterisk | \* | * |
| Plus mark | \+ | + |
| Question mark | \? | ? |
| Letter, digit or underscore | \w | [A-Za-z_0-9] |
| All ASCII printable characters | \W | [ -~] |
| Digit | \d | [0-9] |
| Carriage return | \r | |
| Tab character | \t | |
| Space character | \s |
Have more questions?
-
Support
-
About Us