Test regular expressions instantly
A regular expression (regex) is a compact pattern for finding and extracting text — email addresses, dates, IDs, log lines and more. Getting a pattern exactly right is fiddly, so this tester gives you instant feedback: type a pattern, toggle flags, and every match and capture group is shown as you go.
How to use it
- Enter your pattern (no surrounding slashes).
- Toggle the flags you need — global, ignore-case and so on.
- Paste your test string and read the match list below.
- Optionally add a replacement using
$1,$2to preview substitutions.
Frequently asked questions
Which regex flavour does this use? It uses your browser’s native JavaScript (ECMAScript) regular-expression engine, so behaviour matches what you get in JS code.
What do the flags mean? g finds all matches, i ignores case, m makes ^ and $ match line boundaries, s lets the dot match newlines, and u enables full Unicode.
Can I test replacements? Yes — enter a replacement string using $1, $2 for capture groups and the result updates live.
Is my text private? Completely — matching happens in your browser and nothing is uploaded.
