Helpful Toolbox

Regex Tester

Wrestling with a regex? Test it live and watch your matches light up as you type.

๐Ÿ“– How it works & FAQ
//

What a regex tester is for

A regular expression is a small pattern that describes what text to look for — an email address, a phone number, a date, a price, anything with a shape. Writing one is easy to get slightly wrong, and a pattern that looks right can quietly match too much or nothing at all. This tester lets you type a pattern and a block of sample text side by side and see exactly what matches, highlighted in place, so you can fix it before it ever touches your code.

When you'd reach for it

Common jobs: pulling every URL out of a log file, validating that a form field looks like a postal code, doing a find-and-replace across messy data, or building the pattern your editor's search bar or a script's grep call will use. It's also the fastest way to learn regex — you get instant feedback instead of re-running a program each time. A worked example: to match a US-style date like 2026-07-04, try (\d{4})-(\d{2})-(\d{2}). The parentheses create three capture groups — year, month, and day — which the tester lists separately so you can confirm each piece landed where you meant.

How to use it

  1. Type your pattern into the regex field. You don't need the surrounding slashes — just the expression itself, like \bcat\b.
  2. Set your flags: g to find every match instead of just the first, i to ignore upper/lower case, m to make ^ and $ work per line.
  3. Paste or type your test text below. Matches highlight live as you type, and each match's capture groups are listed so you can see what was captured.
  4. Tweak the pattern until only the right text lights up, then copy the finished expression into your code or editor.

FAQ

Which regex flavor does it use?
JavaScript's regex engine, the same one built into every browser. It's very close to what you'll use in Node, and mostly compatible with PCRE, though a few advanced features like recursion differ.
Why does my pattern match nothing?
Usual culprits: a special character like ., +, or ( that needs a backslash to be treated literally, or a missing g flag so only the first match shows.
Is my text uploaded anywhere?
No. The matching runs entirely in your browser — your pattern and test text never leave your device.
Is it free?
Yes, free and ad-supported, with no sign-up.