> ## 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 FlexiLayout Studio の正規表現リファレンス。文字クラス、繰り返し回数、グループ、郵便番号やメールアドレスのサンプルパターンを紹介します。

**正規表現**とは、単語または field値の構造を形式的に記述したものです。

<div id="regular-expression-syntax">
  ## 正規表現の構文
</div>

| 名称                         | 記号      | 例                                                           |
| -------------------------- | ------- | ----------------------------------------------------------- |
| 任意の文字                      | `*`     | `"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` は単独の英字または数字を許可します。                                      |
| 数字                         | `N`     | `N"th"` は 5th、4th、6th などの単語を許可します。                          |
| 文字列                        | `" "`   | `"cot"`                                                     |
| または                        | `\|`    | `"pl"("o"\|"a")"t"` は "plot" と "plat" という単語を許可します。          |
| グループ内の文字                   | `[]`    | `[tm]"ot"` は "tot" と "mot" という単語を許可します。                     |
| グループに含まれない文字               | `[^]`   | `[^t]"ot"` は "cot" や "lot" などの単語を許可しますが、"tot" という単語は許可しません。 |
| 任意の回数の繰り返し (左側の式または部分式に適用) | `{-}`   | `[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、311th、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`)

<div id="related-topics">
  ## 関連トピック
</div>

* [拡張正規表現](/ja/flexi-capture/fls/appendix/reg-ex-ext)
