Regex tester
Test regular expressions with real-time match highlighting.
Type a regular expression, pick the flags and watch matches highlight in the text as you type, with the first match’s capture groups listed below. It uses the browser’s own JavaScript regex engine — the exact behavior your code will have in production.
Test regular expressions live
Regular expressions (regex) are patterns for finding, validating and extracting pieces of text — an email, a phone number, a date, anything that follows a shape. The tester highlights in real time what your regex captures in the sample text, so you tune the pattern watching the result instantly, instead of running code repeatedly to see what it matched.
Flags and capture groups
Flags change behavior: g finds every occurrence (not just the first), i ignores case, and m treats each line separately. Parentheses create capture groups, which isolate parts of a match — useful to extract, say, only the area code of a phone number. The colored highlighting shows each group, making complex patterns easier to understand.
Your text stays in the browser
The regex and the test text stay on your device — nothing is uploaded. Paste logs, lists or real samples without worry. It is the ideal bench to build the pattern before taking it into your code.
Frequently asked questions
Which regex "flavor" is used?
JavaScript’s (ECMAScript), executed by the browser itself. Features like lookbehind and named groups work in modern browsers; PCRE/Python-only syntax (like (?P<name>)) does not.
What do the g, i, m and s flags do?
g finds all matches (not just the first); i ignores case; m makes ^ and $ work per line; s makes the dot (.) also match line breaks.
Why does my regex freeze other online testers?
Patterns with catastrophic backtracking (e.g. (a+)+b) explode execution time. Here processing is local and capped at 2,000 matches — and your text is never uploaded, which also removes size limits.