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

# 正規表現で使用するアルファベット

> ABBYY 正規表現のアルファベット: 英字、数字、グループ、繰り返し回数を表す記号と、郵便番号、メール、分数のパターン例。

ABBYY の正規表現では、次のアルファベットを使用します。

| 名前             | 記号      | 例                                                   |
| -------------- | ------- | --------------------------------------------------- |
| 任意の文字          | `*`     | `"c"*"t"` は、cat や cot などの単語に一致します。                  |
| 英字             | `C`     | `C"ot"` は、Rot、pot、cot、Dot、mot などの単語に一致します。          |
| 大文字の英字         | `A`     | `A"ot"` は、Rot、Cot、Mot、Dot などの単語に一致します。              |
| 小文字の英字         | `a`     | `a"ot"` は、rot、cot、mot、dot などの単語に一致します。              |
| 英字または数字        | `X`     | `X` は任意の 1 文字の英字または数字に一致します。                        |
| 数字             | `N`     | `N"th"` は、5th、4th、6th などの単語に一致します。                  |
| 文字列            | `" "`   | `"cot"`                                             |
| または            | `\|`    | `"pl"("o"\|"a")"t"` は "plot" と "plat" に一致します。       |
| グループ内の文字       | `[]`    | `[tm]"ot"` は "tot" と "mot" に一致します。                  |
| グループに含まれない文字   | `[^]`   | `[^t]"ot"` は "cot" や "lot" には一致しますが、"tot" には一致しません。 |
| 空白 (グループ内)     | `\s`    | `[A\s]` は文字 A または空白にのみ一致します。                        |
| 任意回数の繰り返し      | `{-}`   | `[AB74]{-}` は、A、B、7、4 を任意に組み合わせた任意の長さの文字列に一致します。    |
| n 回の繰り返し       | `{n}`   | `N{2}"th"` は、25th、84th、11th などの単語に一致します。            |
| n 回から m 回の繰り返し | `{n-m}` | `N{1-3}"th"` は、5th、84th、111th などの単語に一致します。          |
| 0 回から n 回の繰り返し | `{-n}`  | `N{-2}"th"` は、84th や 5th などの単語に一致します。               |
| n 回以上の繰り返し     | `{n-}`  | `N{2-}"th"` は、25th、834th、34576th などの単語に一致します。       |
| 部分式            | `()`    |                                                     |
| ハイフン           | `[\-]`  |                                                     |
| バックスラッシュ       | `[\\]`  |                                                     |

繰り返し演算子は、その左側にある式または部分式に適用されます。

<div id="examples">
  ## 例
</div>

* **郵便番号** – `[0-9]{6}`. サンプル値: `142172`.
* **郵便番号 (USA) ** – `[0-9]{5}("-"[0-9]{4}){-1}`. サンプル値: `55416`, `33701-4313`.
* **収入** – `N{4-8}[,]N{2}`. サンプル値: `15000,00`, `4499,00`.
* **月 (数値) ** – `((|"0")[1-9])|("10")|("11")|("12")`. サンプル値: `4`, `05`, `12`.
* **小数** – `("-"|)([0-9]{1-})(|(("."|",")([0-9]{1-})))`. サンプル値: `1234,567`, `0.99`, `100,0`, `-345.6788903`.
* **メールアドレス** – `[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")`. サンプル値: `support@abbyy.com`, `my-name@company.org.ru`, `info@gallery.museum`.
