Skip to content
AppBox

Regex Tester

Test regular expressions against sample text with live match highlighting, capture groups and replace preview.

Works offlineDeveloper

Pattern

//gi

Find every match, not just the first

Match regardless of upper/lowercase

^ and $ match at each line break

. also matches newline characters

Enables \p{…} property escapes

Test string

Matches highlighted

Add a test string to see matches.

Replace

Use $1, $2 or $<name> to reference capture groups.

Quick reference

SyntaxMeaning
.Any character (except newline unless /s)
\d \w \sDigit · word character · whitespace
\D \W \SThe negation of each
[abc] [^abc]One of these · none of these
* + ?Zero or more · one or more · optional
{2} {2,} {2,5}Exactly · at least · between
(…)Capture group
(?:…)Group without capturing
(?<name>…)Named capture group
^ $Start · end of string (or line with /m)
\bWord boundary
a|bEither a or b
(?=…) (?!…)Lookahead · negative lookahead

About the regex tester

Write a pattern, toggle the flags and see every match highlighted in your test string as you type. A table below lists each match with its index and named or numbered capture groups broken out. A replace field previews the substituted result, with $1 style references supported, and a quick-reference panel covers the syntax you keep forgetting.

This tool runs entirely in your browser. Nothing you type is uploaded, and it keeps working with no connection at all — including as an installed app.