Regex Tester

Test regular expressions live: match highlighting, hit count, capture groups for each match, and friendly error messages for broken patterns.

Type a pattern first.

What is it

A regular expression (regex) is a tiny pattern language for finding text. You write a pattern like d+ for one or more digits, and the tool hunts it through your sample text. Groups in parentheses remember pieces of each match, which is handy when you want to extract parts of an email or a date.

Notes & fun facts

Programmers have a running joke: «I had a problem, so I wrote a regex — now I have two problems». Regex is famously write-once-read-never, but even a half-hour with this tester usually means you will actually read your own pattern tomorrow.

Origin & history

Regular expressions were invented by Stephen Kleene in the mid-1950s as a mathematical model of finite automata. Ken Thompson put them into Unix in the late 1960s and then into grep (1973), which turned them from theory into everyday practice. JavaScript adopted Perl-style regexes in the 1990s.

Keep a kind heart, hold integrity as your foundation, and cherish warm love; may the world know peace and humanity live in harmony.
持善良之心,守正直之本,怀温暖之爱;愿世界和平,人间祥和。