Toolora

Regex Tester

Test regular expressions with live matches, replacement, split and token-by-token explanation.

The Regex Tester runs a regular expression against sample text in Match, Replace and Split modes, shows every match, capture group and position, and explains each pattern token. It is useful while building search patterns for validation, transformation and data extraction.
Mode
Flags

Common patterns

Regex explanation

0 matches

Total matched: 0 chars

Input length: 0 chars

How to use

  1. Choose Match, Replace or Split mode.
  2. Enter a regular expression and toggle flags such as g, i, m, s, u or y.
  3. Paste sample text and review highlighted matches, output and the token-by-token explanation.

Frequently asked questions

Is the regex evaluated securely?

Patterns run inside the JavaScript RegExp engine and can only access the text you enter.

How does replacement mode work?

Replacement follows JavaScript semantics: $1 and ${name} reference capture groups, and the global flag replaces every occurrence.

Why do matches stop at 500?

The list is capped to keep the page responsive on very large inputs.