Regex Tester
Free online regex tester. Test regular expressions against your text with live match highlighting, capture groups and flags — instantly and privately in your browser.
🔒 Your pattern and text are processed entirely in your browser — nothing is uploaded.
Free Regex Tester
This free online regex tester lets you build and check regular expressions in real time. Type a pattern, pick your flags, paste any test string, and every match is highlighted instantly — with a live match count, the captured groups, and the index of each result. It’s free, needs no sign-up, and runs entirely in your browser, so your patterns and text never leave your device.
How to use the regex tester
- Enter your pattern in the expression box (for example
\d+). Don’t add the surrounding slashes — they’re shown for you. - Tick the flags you need:
gfor all matches,ito ignore case, and so on. - Paste your test string into the test box on the left.
- Watch the matches highlight on the right, and read each match’s capture groups in the details list below.
- Click Copy matches to grab every matched substring at once.
Regex quick reference
A regular expression describes a search pattern. These are the tokens you’ll reach for most often:
\d— any digit (0–9);\w— a word character (letters, digits, underscore);\s— any whitespace..— any character (except newline, unless thesflag is on).+— one or more;*— zero or more;?— zero or one (optional).^— start of the string (or line withm);$— end of the string or line.[abc]— a character set matching any one listed character;[a-z]matches a range.(...)— a capture group, so you can extract part of the match separately.
The flags change how the whole pattern behaves: g (global) finds every match instead of just the
first, i makes matching case-insensitive, m (multiline) makes ^ and
$ match at line breaks, s (dotall) lets . match newlines, u
enables full Unicode handling, and y (sticky) anchors each search to the previous match’s end.