Regular Expression Tester

Test regular expressions live against sample text. See matches, capture groups and flags highlighted as you type.

—

About this tool

Regular expressions are powerful but easy to get wrong. Testing them against sample input as you write is the fastest way to be sure they behave as intended.

Enter a pattern and flags, add test text, and every match is highlighted with its capture groups listed.

  • Live matching as you type
  • Support for flags such as g, i, m and s
  • Numbered capture groups

Frequently asked questions

Which regex engine is used?
The JavaScript engine built into your browser, which follows the ECMAScript regular expression specification.
What do the flags mean?
g finds all matches, i ignores case, m makes ^ and $ match each line, and s lets . match newlines.
How do capture groups work?
Parentheses in the pattern capture parts of the match. Each captured value is listed for every match found.

Related tools