Regex Tester
Test regular expressions live with match highlighting and capture groups.
Runs entirely in your browser — your input never leaves your deviceAbout this tool
Enter a pattern, toggle the flags you need (g i m s u y), and paste your test string. Matches are listed instantly with their capture groups, and an invalid pattern shows the engine's exact error so you can fix it fast.
It uses the JavaScript regex engine, so what works here works in your JS/TS code. Nothing is uploaded — patterns and test data stay in your browser.
Why use it
Live matches
See matches and capture groups update as you type, with the engine's error on invalid patterns.
All JS flags
Toggle g, i, m, s, u and y to mirror your code exactly.
Same as your runtime
Uses the JavaScript regex engine, so results match Node and the browser.
Common use cases
- Build and debug a regular expression
- Confirm capture groups extract the right parts
- Test a pattern against sample input
- Learn how flags change matching
Frequently asked questions
Which regex flavour does this use?
The native JavaScript (ECMAScript) engine, so behaviour matches regex in your Node.js or browser code exactly.
What do the flags mean?
g = global (all matches), i = case-insensitive, m = multiline ^/$, s = dotAll (. matches newlines), u = unicode, y = sticky.
Can I see capture groups?
Yes. Each match lists its numbered capture groups so you can confirm your parentheses capture what you expect.
Is my data private?
Yes — the pattern and test string are evaluated entirely in your browser and never sent anywhere.