Regex Tester
Test a regular expression against a string — highlights all matches and shows captured groups.
Monitor this automatically
NetTests can run this check on a schedule, preserve historical results, compare changes over time, and alert you the moment something breaks.
Start monitoring free → See all monitoring productsFrequently Asked Questions
What does the regex tester do?
It runs your regular expression against the test text and shows every match, the captured groups inside each match, and highlights the matches inline so you can see exactly what your pattern does before using it in code.
Which regex flavor / syntax does it use?
It uses Python's re engine. The syntax is very close to PCRE and JavaScript regex for everyday patterns, but a few advanced features differ — Python uses (?P<name>…) for named groups and \1 style backreferences. Most patterns you'd write for JavaScript or PHP behave the same here.
What are capturing groups?
Parentheses ( ) create a capturing group — the part of the match they surround is extracted separately. For example (\d{4})-(\d{2}) against 2026-06 captures 2026 and 06 as groups 1 and 2. Use (?:…) for a non-capturing group when you only need grouping for alternation or quantifiers.
What do common regex tokens mean?
\ddigit,\wword char,\swhitespace..any character,*zero-or-more,+one-or-more,?optional.^start,$end,|alternation.[a-z]character class,{2,5}between 2 and 5 repetitions.
Why isn't my pattern matching anything?
The most common causes are an unescaped special character (escape literal dots as \.), a greedy quantifier consuming too much, or a case mismatch. Try simplifying the pattern piece by piece and check whether you need case-insensitive matching.