Free · Runs in your browser · No signup

Test regular expressions with live match highlighting

Type a regular expression and some test text to see every match highlighted instantly, along with numbered and named capture groups and a live replacement preview.

//g

Matches: 0

Contact: alice@example.com, bob@site.com
How it works

Regex Tester: 3 simple steps

  1. 1

    Enter your pattern and choose flags.

  2. 2

    Paste the text you want to test.

  3. 3

    Read the highlighted matches, groups and the replacement result.

It uses your browser's JavaScript regex engine, so what you see here is what runs in Node.js and front-end code. Flags such as global, case-insensitive, multiline and dotAll can be toggled with a click.

Why use it

Built for speed and privacy

  • Live highlighting as you type
  • Numbered and named capture groups
  • Replacement preview with $1 and $<name>
  • Safe: runs locally with a match limit
FAQ

Regex Tester FAQ

JavaScript (ECMAScript). Lookbehinds, named groups and Unicode property escapes are supported in modern browsers.

g finds all matches, i ignores case, m makes ^ and $ match at line boundaries, s lets . match newlines, u enables Unicode mode and y matches only at the last index.

Check for unescaped special characters such as . ( ) + ? and make sure the right flags are enabled. Backslashes should be written once here, not doubled as in a string literal.

Catastrophic backtracking is possible with some patterns. The tester stops after a large number of matches, but if it stalls, simplify the pattern.

Data extraction and automation at scale?

We build parsers, pipelines and AI agents that clean and route your data.