> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alphabet used in regular expressions

> Regular expression reference for ABBYY FlexiLayout Studio: character classes, repetition counts, and groups, with sample patterns for zip codes and emails.

A **regular expression** is a formal description of the structure of a word or a field value.

## Regular expression syntax

| Name                                                                               | Symbol  | Example                                                                             |
| ---------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------- |
| Any character                                                                      | `*`     | `"c"*"t"` allows words such as cat and cot.                                         |
| Letter                                                                             | `C`     | `C"ot"` allows words such as Rot, pot, cot, Dot, and mot.                           |
| Uppercase letter                                                                   | `A`     | `A"ot"` allows words such as Rot, Cot, Mot, and Dot.                                |
| Lowercase letter                                                                   | `a`     | `a"ot"` allows words such as rot, cot, mot, and dot.                                |
| Letter or number                                                                   | `X`     | `X` allows any standalone number or letter.                                         |
| Number                                                                             | `N`     | `N"th"` allows words such as 5th, 4th, and 6th.                                     |
| String                                                                             | `" "`   | `"cot"`                                                                             |
| Or                                                                                 | `\|`    | `"pl"("o"\|"a")"t"` allows the words "plot" and "plat".                             |
| Character from group                                                               | `[]`    | `[tm]"ot"` allows the words "tot" and "mot".                                        |
| Character not from group                                                           | `[^]`   | `[^t]"ot"` allows words such as "cot" and "lot", but not the word "tot".            |
| Any number of repetitions (applies to the expression or subexpression on the left) | `{-}`   | `[AB74]{-}` allows any combination of the characters A, B, 7, and 4, of any length. |
| Number of repetitions n                                                            | `{n}`   | `N{2}"th"` allows words such as 25th, 84th, and 11th.                               |
| From n to m repetitions                                                            | `{n-m}` | `N{1-3}"th"` allows words such as 5th, 84th, and 111th.                             |
| From 0 to n repetitions                                                            | `{-n}`  | `N{-2}"th"` allows words such as 84th and 5th.                                      |
| From n repetitions and more                                                        | `{n-}`  | `N{2-}"th"` allows words such as 25th, 834th, 311th, and 34576th.                   |
| Subexpression                                                                      | `()`    |                                                                                     |
| Hyphen symbol                                                                      | `[\-]`  |                                                                                     |
| Slash symbol                                                                       | `[\\]`  |                                                                                     |

## Examples

* **Postal code** – `[0-9]{6}` (sample value: `142172`)
* **Zip code (USA)** – `[0-9]{5}("-"[0-9]{4}){-1}` (sample values: `55416`, `33701-4313`)
* **Income** – `N{4-8}[,]N{2}` (sample values: `15000,00`, `4499,00`)
* **Month in numerical form** – `((|"0")[1-9])|("10")|("11")|("12")` (sample values: `4`, `05`, `12`)
* **Fraction** – `("-"|)([0-9]{1-})(|(("."|",")([0-9]{1-})))` (sample values: `1234,567`, `0.99`, `100,0`, `-345.6788903`)
* **Email** – `[A-Za-z0-9_]{1-}(("."|"-")[A-Za-z0-9_]{1-}){-3}"@"[A-Za-z0-9_]{1-}(("."|"-")[A-Za-z0-9_]{1-}){-4}"."([A-Za-z]{2-4}|"asia"|"museum"|"travel"|"example"|"localhost"` (sample values: `support@abbyy.com`, `my-name@company.org.ru`, `info@gallery.museum`)

## Related topics

* [Extended regular expressions](/flexi-capture/fls/appendix/reg-ex-ext)
