Regex/Regex Tester
Regex Tester
Write a regular expression and see every match highlighted in real time. Inspect captured groups, test replacements, and toggle flags — all in your browser.
🔒All matching runs locally in your browser. Nothing leaves your device.
Highlighted Matches
Match List
| # | Index | Match |
|---|---|---|
| 1 | 0–3 | Ada |
| 2 | 4–12 | Lovelace |
| 3 | 52–59 | Charles |
| 4 | 60–67 | Babbage |
| 5 | 81–91 | Analytical |
| 6 | 92–98 | Engine |
| 7 | 100–105 | Grace |
| 8 | 106–112 | Hopper |
How to use this tool
Enter a pattern in the top field and your test text in the left pane. Matches are highlighted in real time on the right. Use the flag buttons to toggle global (g), case-insensitive (i), multiline (m), dotAll (s), and Unicode (u) modes.
Switch to the Replace tab to apply a replacement string. Use $& to insert the whole match, $1 for the first capture group, and so on — the same syntax as JavaScript's String.prototype.replace.
The match list shows the start and end index of every match plus any captured groups or named groups.
FAQ
Is my text sent anywhere?
No. All matching is done with the browser's built-in RegExp engine. Nothing is transmitted.
What regex flavour is this?
JavaScript (ECMAScript) regex. It supports lookaheads, lookbehinds (ES2018+), named capture groups ((?<name>…)), and Unicode categories with the u flag. It does not support PCRE extensions like recursive patterns or conditionals.
Why do I see “empty” matches?
Patterns like a* can match zero characters between every position. The tester still displays them and advances the cursor by one to avoid an infinite loop.
Is there a match limit?
The tester caps at 5,000 matches to keep the UI responsive. The full match count is always shown even if only 200 rows are displayed in the table.
Need to escape special regex characters in a string? Try String Escape / Unescape →