Skip to content
Toolseta
Runs in your browser

Regex Tester

Test JavaScript regular expressions with live match highlighting and groups.

/
Matches

    
#MatchGroups

About Regex Tester

Write a regular expression and see every match highlighted in your test text as you type. Capture groups and named groups are listed per match, and replace mode previews the output of String.replace with $1 or $<name> references.

How it works

  1. 1

    Enter a pattern and choose flags (g, i, m, s, u).

  2. 2

    Paste test text — matches are highlighted instantly.

  3. 3

    Optionally enter a replacement to preview the result.

Frequently asked questions

Which regex flavour is used?

JavaScript (ECMAScript), which is close to PCRE for most everyday patterns. Lookbehind and named groups are supported in modern browsers.

Can a pattern freeze the page?

Catastrophic backtracking can be slow. The tester limits the number of matches it collects to keep the page responsive.