REGEX

Regex Tester

Write, test, and debug regular expressions in real time with highlighted matches and capture groups.

Regex Tester

This calculator auto-updates when values change.

2 match(es)

hello@example.comIndex 8
support@calcitanything.comIndex 29

About This Regex Tester

This regex tester runs a regular expression against sample text and lists matches, indexes, and capture groups.

It is useful for debugging validation rules, parsing text, checking patterns, and learning how flags change regex behavior.

How to Use This Tool

  1. 1

    Enter a pattern

    Type the regular expression without surrounding slash characters.

  2. 2

    Choose flags

    Toggle common flags such as global, case-insensitive, multiline, and dotAll.

  3. 3

    Review matches

    Inspect match count, matched text, positions, and capture groups.

Frequently Asked Questions

Why is my regex invalid?v

The pattern may include unmatched brackets, invalid escapes, or syntax not supported by JavaScript regular expressions.

What does the global flag do?v

The global flag finds all matches instead of stopping after the first match.

Can zero-length matches cause problems?v

They can in loops, so the tester advances safely when a match has zero length.