正規表現(Regex)検証・テストツール
正規表現(Regex)のマッチングをリアルタイム検証します。
概要:正規表現パターンとフラグ(g/i/m)を指定しテキストのマッチング箇所をリアルタイム強調表示します。
Regular Expression Parameters
//g
Expression Flags
Pattern Match Status
0 Matches
Live Highlight Preview
Hello World 1234, order 5678
Regex Quick Cheat-Sheet Reference▼
Character Classes
- . - Any character except newline
- \d - Any digit (0-9)
- \w - Word character (a-z, A-Z, 0-9, _)
- \s - Whitespace character
- [abc] - Any character in brackets
- [^abc] - Any character NOT in brackets
Quantifiers
- * - 0 or more times
- + - 1 or more times
- ? - 0 or 1 time (optional)
- {n} - Exactly n times
- {n,} - n or more times
- {n,m} - Between n and m times
Anchors & Groups
- ^ - Start of string / line
- $ - End of string / line
- \b - Word boundary
- (abc) - Capture group
- (?:abc) - Non-capturing group
- (?<name>abc) - Named capture group
Embed this Tool on Your Website
Copy this code snippet to add the 正規表現(Regex)検証・テストツール to your blog or website for free. It adjusts dynamically to mobile and desktop screens.
Share This Tool
使い方 — 正規表現(Regex)検証・テストツール
1. 正規表現パターンとフラグ(g, i, m)を入力します。
2. テスト対象のテキストを入力します。
3. マッチした箇所とキャプチャグループを確認します。
仕組み — 正規表現(Regex)検証・テストツール
JavaScript標準の RegExp エンジンでパターン評価します。
計算式:Matches = text.matchAll(new RegExp(pattern, flags))
計算例:
メールアドレス検出パターン `[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}` をテストできます。
よくある質問
はい、グループごとのマッチ結果も詳細表示されます。

