How to use
- Enter the pattern and flags (such as g or i).
- Enter test text — matches are highlighted and groups appear in the table.
- Use $1 and $2 in the replace field to preview a replacement.
Matches are highlighted every time you edit the pattern. Check group values and the replace result too.
| # | Match | Groups | Index |
|---|
🔒 What you enter never goes to a server — every calculation happens on your device (in your browser).
g finds all matches, i ignores case, m makes ^ and $ work per line, s lets the dot match newlines and u handles Unicode (including emoji) correctly. This tool uses JavaScript regex syntax, which is very close to other languages (Python, Java) but differs in some details.
Patterns with nested repetition like (a+)+ can take extremely long on longer text. This tool stops the calculation after 1 second and tells you.
Yes. Write (?<year>\d{4}) and the table shows the name and value.
Yes. Use the u flag for accurate Unicode handling.
The table shows the first 300; up to 1000 are calculated.
No. It's calculated only in your browser.