Regex Tester
Test JavaScript regular expressions live against your own text. See every match with its position, capture groups and flags, fix invalid patterns with clear error messages, and copy a ready-to-use regex.
g = global, i = case-insensitive, m = multiline, s = dotall, u = unicode, y = sticky. You can also type /pattern/gi in the Pattern box.
Runs the standard JavaScript RegExp engine. Test text is processed locally.
Enter a pattern and press Test.
About the Regex Tester
Test JavaScript regular expressions live against your own text. See every match with its position, capture groups and flags, fix invalid patterns with clear error messages, and copy a ready-to-use regex.
Patterns and text are evaluated only in your browser.
How to use the Regex Tester
- Step 1Type a pattern (no slashes needed) and pick flags such as g for global.
- Step 2Paste or type the text you want to search.
- Step 3Press <strong>Test</strong> to see highlighted matches and a list with positions.
When people reach for this tool
See what a pattern actually matches
Every match, with its position and capture groups, removes the guesswork from a pattern that looks plausible.
Get a clear message for an invalid pattern
An unbalanced bracket or a stray quantifier is reported precisely instead of silently matching nothing.
Pull structured values out of messy text
Named groups turn a wall of log lines into a table of separate fields.
Practical tips
- JavaScript regular expressions are not the same as PCRE or POSIX. A pattern that works in a search engine may need rewriting here.
- A pattern that matches nothing is far more often too greedy than too strict — try removing the outermost group.
What you get
- Runs the real JavaScript RegExp engine
- Live highlight of every match in your text
- Match list with positions and capture groups
- Supports g, i, m, s, u and y flags
- Clear, human-friendly error messages
Regex Tester — FAQ
Does it support lookahead and named groups?
Why is nothing highlighted?
Why does my pattern match nothing?
What are the flags for?
More developer tools
All 17 other tools in this collection — free, no sign-up, nothing uploaded.