Developer tools

Regex tester

Test a regular expression against your text, with live match highlighting and capture groups.

Runs in your browser. Nothing you enter is uploaded.

Result

Matches and groups

About this tool

The regex tester runs a JavaScript regular expression against your text, highlights every match as you type and lists numbered and named capture groups for each one. The g flag is always added so all matches are found, and the list stops at 2000 matches. Presets for email, URL and date patterns are included.

Which regex syntax does it use?
Your browser’s JavaScript RegExp engine, with flags such as i, m, s, u and y typed into the flags field. Patterns written for PCRE or Python may need small changes.
Why did the page freeze on my pattern?
The match runs on the page’s main thread, so a pattern with catastrophic backtracking, such as (a+)+$, can lock the tab on long input. Close the tab and simplify the nested quantifiers.