What is a regex tester?
A regex tester is an interactive tool for testing regular expressions against text. Enter a pattern, pick the JavaScript RegExp flags you need, and watch every match highlight instantly together with its capturing groups. Regular expressions are the patterns used to search, validate and rewrite text — email addresses, URLs, log lines, identifiers.
Take the pattern ^(\d{4})-(\d{2})-(\d{2})$ against the text 2026-10-08. The ^ and $ anchors require the whole line, \d{4} matches the four-digit year, \d{2} the month and day, and the parentheses open three capturing groups — so the match reports group 1 = 2026, group 2 = 10 and group 3 = 08.
How to use the regex tester
- Type or paste a pattern into the Pattern field — the /…/ delimiters are optional.
- Toggle the flags you need: g for all matches, i for case-insensitive, m for multiline, s so the dot matches newlines.
- Paste the text you want to test into the Test text field.
- Read the highlighted matches and open one to inspect its numbered capturing groups.
Frequently asked questions about regex
Which regex flavour does the tester use?
It uses the JavaScript RegExp engine — the same one as your browser and Node.js. Patterns are valid client-side JavaScript; PCRE-only constructs such as named groups with (?P<name>…) are not supported.
What is the difference between a capturing and a non-capturing group?
(…) is a capturing group: its text is stored in a numbered group and highlighted in the results. (?:…) groups without capturing, which is handy when you only need to apply a quantifier to a sequence.
Why does my pattern match nothing?
The usual causes are a missing escape (\d, \.), a greedy quantifier swallowing too much text, or missing anchors. Check the flags too — without g only the first match is reported.
