← Back to all tools
regex tester

Build and test regular expressions live.

Write a pattern, paste your test text, and see every match highlighted instantly — with capture groups broken out below.

/ /
Test string
Highlighted matches
Matches will be highlighted here as you type.
Write a pattern and paste text to test it
Everything runs locally in your browser using JavaScript's native RegExp engine — your text is never sent to a server.
Frequently asked questions
g (global) finds every match instead of stopping at the first one — usually you want this on. i makes matching case-insensitive. m (multiline) makes ^ and $ match the start/end of each line instead of just the whole string. s (dotall) makes . match newline characters too, which it normally doesn't.
Make sure the g (global) flag is turned on — without it, JavaScript's regex engine stops after the first match by default.
Wrapping part of your pattern in parentheses (like this) creates a capture group — a specific piece of the match you can extract separately, like pulling just the domain out of an email match. This tool lists each group's captured value below the full match.
Mostly, yes — core regex syntax (character classes, quantifiers, groups) is shared across languages. But some details differ: JavaScript doesn't support certain features other engines have (like recursive patterns), and named group syntax can vary slightly. For most everyday patterns (emails, dates, validation), what works here will work elsewhere too.
No — matching happens entirely in your browser using JavaScript's built-in regex engine. Nothing is uploaded or stored.