Regex Tester
Test a regular expression against a string with live match highlighting.
About Regex Tester
Tests a regular expression against a sample string, highlighting matches and capture groups directly against the input so you can see exactly what a pattern does and doesn't catch without running actual code. Regex is notoriously easy to write almost right — a pattern that matches the three examples you tried by hand but fails on the fourth edge case in production. Worth testing both strings that should match and strings that specifically shouldn't, since a pattern that's too permissive is just as much a bug as one that's too strict.
Regex syntax isn't fully identical across languages and engines — a lookbehind or named capture group that works here may need adjusting for a different language's regex implementation, since not every engine supports every feature.
Quick Reference
? 0 or 1 {n,m} range
[abc] class [^abc] not
^ start $ end
\d digit \w word \s space
(…) group (?:…) non-cap
a|b or \b word boundary
Flags: g=global i=case m=multiline s=dotall