> ## 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

> Alphabet of ABBYY regular expressions: symbols for letters, numbers, groups, and repetitions, with sample patterns for zip codes, email, and fractions.

ABBYY regular expressions use the following alphabet.

| 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 single letter or number.                              |
| Number                     | `N`     | `N"th"` allows words such as 5th, 4th, and 6th.                      |
| String                     | `" "`   | `"cot"`                                                              |
| Or                         | `\|`    | `"pl"("o"\|"a")"t"` allows "plot" and "plat".                        |
| Character from a group     | `[]`    | `[tm]"ot"` allows "tot" and "mot".                                   |
| Character not from a group | `[^]`   | `[^t]"ot"` allows "cot" and "lot" but not "tot".                     |
| Space (within a group)     | `\s`    | `[A\s]` allows only the letter A or a space.                         |
| Any number of repetitions  | `{-}`   | `[AB74]{-}` allows any combination of A, B, 7, and 4, of any length. |
| n repetitions              | `{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.                       |
| n or more repetitions      | `{n-}`  | `N{2-}"th"` allows words such as 25th, 834th, and 34576th.           |
| Subexpression              | `()`    |                                                                      |
| Hyphen                     | `[\-]`  |                                                                      |
| Backslash                  | `[\\]`  |                                                                      |

The repetition operators apply to the expression or subexpression on their left.

## 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 (numeric)** – `((|"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`.
