| # | Match Text | Index | Groups ($1, $2...) |
|---|---|---|---|
| No match groups extracted | |||
Test JavaScript regular expressions against sample text, inspect capture groups, and preview replacements as you edit.
| # | Match Text | Index | Groups ($1, $2...) |
|---|---|---|---|
| No match groups extracted | |||
Pattern: \b[A-Z]{2}-\d{3}\b with the global flag. Sample text: AB-123 and XY-456.
The engine follows JavaScript regex syntax; PCRE, Python and other engines differ. Complex patterns can freeze the browser through excessive backtracking. Keep adversarial samples small and avoid treating a regex as a complete security validator.
The tool's browser code handles entered text or selected files locally. Optional URL imports and external resources can make network requests. This website also uses third-party scripts, including analytics and advertising. Read the privacy policy and use sample data when testing sensitive workflows.
Found a problem? Report a tool issue with the browser version and steps to reproduce it. Avoid sending private document content or credentials.
This tool uses the browser's JavaScript regex engine. Features and escaping rules can differ from PCRE or another server-side engine.
The g flag searches for successive matches instead of stopping at the first one.
Some patterns perform excessive backtracking on particular input. Simplify nested repetitions and bound input size.