Home › Regex Tester — Free Online Tool | Wgajaa
.* Regex Tester
Test regular expressions live with match highlighting. Free, private and instant — nothing you enter is sent anywhere.
About this tool
Test regular expressions live with instant match feedback. Type a pattern, set your flags, and paste sample text — every match and capture group is listed with its position as you type, so you can iterate on a pattern without spinning up a REPL.
The tool uses your browser's own JavaScript regex engine (ECMAScript), so what you validate here is exactly what your front-end and Node.js code will do. Invalid patterns surface the engine's real error message, and a match cap keeps pathological patterns from freezing the tab.
How this tool works
Everything runs locally in your browser — no data is sent to any server. Here is exactly how it works:
- Enter your regex pattern in the Pattern field
- Add flags such as g, i, m or s in the Flags field
- Paste the text you want to test into the Test string area
- Read the match list — each entry shows the matched text, its position and any capture groups
Frequently Asked Questions
The ECMAScript flavor that ships with your browser — the same engine behind JavaScript's RegExp. Lookaheads and lookbehinds, named groups like (?<year>…) and unicode property escapes all work; POSIX classes such as [[:alpha:]] do not.
g finds all matches instead of stopping at the first, i makes matching case-insensitive, m makes ^ and $ match line boundaries, s lets dot match newlines, and u enables full unicode handling.
Without the g flag the engine returns just the first match, which is correct behavior. Add g to list every occurrence. The tool also caps the list at 500 matches to keep very large inputs responsive.
Each match entry lists its indexed groups. Non-participating groups show as empty, which usually means the group sat inside an alternative that did not match.
The tool protects itself: patterns compile inside error handling and match loops are capped, so a pathological pattern either errors out clearly or stops early instead of freezing the page.