Test
Regex Tester
Type a pattern and flags, paste sample text, and see every match highlighted live — with capture groups broken out below.
Test
Type a pattern and flags, paste sample text, and see every match highlighted live — with capture groups broken out below.
Walkthrough
Use cases
Validating a pattern before shipping it. Test edge cases against a pattern — empty strings, extra whitespace, unexpected characters — before it goes into a form validator or a backend check.
Extracting data from log lines. Write a pattern with capture groups to pull timestamps, IPs, or error codes out of raw log text and confirm the groups line up correctly.
Learning or teaching regex. See immediately how changing a quantifier or anchor changes what matches, which is faster than trial-and-error in application code.
FAQ
JavaScript's native RegExp engine — the same one your browser and Node.js use. Patterns behave identically if you're testing something destined for JS code.
Check your flags first: without the "g" flag only the first match is found, and without "i" matching is case-sensitive. Also confirm you haven't accidentally escaped a character that doesn't need it.
Yes — each match's capture groups are listed underneath the highlighted text, in order.
No. Matching runs with JavaScript's built-in RegExp in your browser tab; nothing is transmitted or stored.
Related