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, explains each pattern token, and exports match results as JSON. Sample inputs make it easy to try common use cases.
Mode
Flags

Common patterns

Sample inputs

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 or load a sample input, then 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.

What does Export JSON do?

It downloads the current matches with positions, groups and named groups as a JSON file.