Regex Tester
Test and debug JavaScript regular expressions live in your browser — highlight matches and inspect every result.
100% in your browser
No watermark
No sign-up
How it works
- Type your regular expression pattern in the pattern box (without the surrounding slashes).
- Toggle the g, i, m, s, or u flag checkboxes to control matching behaviour.
- Paste or type the text you want to test — matches highlight in real time.
- Scroll down to see each individual match together with its index position in the string.
Frequently asked questions
- Which regex flavour is used?
- JavaScript's built-in RegExp engine, exactly as supported by your browser. This means features like named capture groups, lookahead, lookbehind, and Unicode property escapes (with the u flag) are all available.
- What does the g flag do?
- The global flag (g) makes the engine find every non-overlapping match in the text. Without it, only the first match is returned and highlighted.
- What does the s flag do?
- The dotAll flag (s) makes the dot (.) match any character including newlines. Without it, . skips line-break characters.
- Is my text sent to a server?
- No. All matching runs locally with the browser's native RegExp — your pattern and text never leave your device.