Regex Tester
Test and visualize regular expressions.
Overview
Type a regular expression and a test string, see every match highlighted, capture groups extracted, and any errors explained inline. The tester runs live as you type, so you can iterate on a complex pattern without round-tripping through code.
Developers debugging regex in JavaScript, Python, C#, or any other language reach for an interactive tester first. Data analysts cleaning structured strings, log-parsing engineers, and anyone learning regex from scratch also use it because seeing match boundaries in real time is the fastest way to develop intuition.
How it works
You enter a pattern and flags (case-insensitive, multiline, global, dot-all). The tester compiles the pattern using the host runtime's regex engine and runs it against your test text, marking each match with a coloured background and listing capture groups in a table. If the pattern is invalid (unbalanced bracket, dangling quantifier), the error is shown with a pointer at the offending character.
Most testers also explain each part of the pattern in plain English alongside the live results.
Examples
Pattern: \b\d{3}-\d{4}\b
Text: Call me at 555-1234 or 555-5678
Matches: 555-1234, 555-5678
Pattern: (\w+)@(\w+\.\w+)
Text: alice@example.com and bob@test.org
Groups: match=alice@example.com g1=alice g2=example.com
match=bob@test.org g1=bob g2=test.org
Pattern: ^[A-Z]
Flags: multiline
Text: Hello\nworld\nFoo
Matches: H, F
FAQ
Which regex flavor does it use?
Browser-based testers use the JavaScript engine (ECMAScript regex). Patterns translate well to most flavours, but a few features (named groups in older JS, regex options in PCRE) differ — check the flag panel for what's supported.
What do the flags mean?
g returns all matches not just the first. i is case-insensitive. m makes ^ and $ match line boundaries. s (dot-all) lets . match newlines. u enables full Unicode support.
Why is my pattern "catastrophically slow"?
Nested quantifiers like (a+)+ can blow up exponentially on certain inputs. The tester usually times out after a few seconds and warns you. Rewrite using possessive quantifiers or atomic groups where supported.