* and ? are the only special characters, a regular expression lets you spell out exactly what each part of the text must look like: which characters are allowed, how many, and where. You write the expression including its delimiters, such as /^[A-Z]{3}-[0-9]{4}$/, which here means “three capital letters, a dash, then exactly four digits”. With that expression, a value like AB-12 passes this condition because it does not fit, while ABC-1234 fails because it does. When wildcards are enough, String: Does not match wildcard pattern is usually easier.
Fields
Sample data
With the expression set to/^[A-Z]{3}-[0-9]{4}$/, the condition checks whether a product code is not exactly three capital letters, a dash, and four digits.
| Field | Value |
|---|---|
| Value | /^[A-Z]{3}-[0-9]{4}$/ |
| Value | Result |
|---|---|
AB-12 | Matches |
ABC-1234 | Does not match |