Regex Tester
Test a regular expression against text and see all matches with positions and named groups.
About Regex Tester
Regex Tester runs your regular expression against a block of text and shows every match with its exact position and any named capture groups. It's the fast way to confirm a pattern behaves before you paste it into code or a find-and-replace. Everything evaluates locally in your browser, so the text you're testing against never leaves your machine.
- Category
- inspect
- Input
- Accepts: text/plain.
- Output
- Outputs: application/json.
- Cost
- Free, runs in your browser
- Memory
- low
Common uses
- Verify a pattern catches every email address in a sample log before deploying it in a validation function
- Debug why a capture group is grabbing too much by inspecting the start and end index of each match
- Confirm named groups like (?<year>\d{4}) populate correctly when parsing date-shaped strings
- Test an extraction pattern against messy pasted CSV or text to see which rows it actually hits
- Sanity-check a regex copied from Stack Overflow against your own input before trusting it in production
Frequently asked questions
Does my test text get sent to a server?
No. The expression and the text are matched entirely in your browser; nothing is uploaded.
Does it support named capture groups?
Yes. Matches return named groups alongside numbered groups and the position of each match.
What regex flavor does it use?
It uses the JavaScript regex engine, so patterns behave the same as they would in browser and Node.js code.
What does the output look like?
Structured JSON listing each match, its position, and its captured groups — easy to scan or feed into another tool.
Can I test against large input?
Yes, you can paste sizable text. Catastrophically backtracking patterns can still run slowly, which is itself a useful warning.
Can it generate a regex from a description?
Not this tool — it tests patterns you supply. For AI-generated regex from plain English, try Regex From Text.
Keywords
- regex
- regexp
- regular
- expression
- pattern
- match
- test