A regex tester compiles a regular-expression pattern and applies it to sample text so matches, positions, and capture groups can be inspected before the expression is used in an application.
Regex Tester & Matcher
Enter an ECMAScript regular-expression pattern, choose flags, and paste test text to highlight matches and inspect capture groups. Execution happens locally in an isolated browser worker with a timeout.
- Instant results
- Mobile friendly
- Free to use
What is a Regular Expression (Regex) Tester?
A regex tester is a programming tool used to build, validate, and debug patterns for text matching and extraction. Enter a pattern, select flags, and paste test text to highlight matches and capture groups locally in your browser.
Test a regular expression
Patterns run in a Web Worker with a time limit to keep the interface responsive.
Test text
0 characters · 0 linesEnter a pattern and test text to begin.
Match preview
Matches will appear here.
Matches and capture groups
| # | Position | Full match | Capture groups |
|---|
How to use the Regex Tester & Matcher
Follow these steps to get a clear result.
- 1
Enter an ECMAScript regular-expression pattern without surrounding slash characters.
- 2
Enable the flags required by the pattern, such as global or case-insensitive matching.
- 3
Paste test text or load a preset example; matching runs after a short input delay.
- 4
Review highlighted text, match positions, and capture groups before using the expression in code.
Regex Tester & Matcher FAQ
This tool uses the browser JavaScript RegExp engine and therefore follows ECMAScript regular-expression syntax. Java Pattern, Python re, PCRE, .NET, and other engines have syntax and behavior differences.
No. The pattern and test text are processed locally in the browser. Regex execution occurs in an isolated Web Worker and is stopped if it exceeds the configured time limit.
Some patterns cause excessive backtracking on particular input. A timeout protects the browser interface, but the expression should still be simplified before production use.
The g flag finds every non-overlapping match. Without g, the tester returns only the first match.