Regex Tester
Pattern ToolsTest regular expressions with live highlighting and capture groups
About Regex Tester
Tests regular expressions against input text with real-time match highlighting. As you type either the pattern or the test string, matches are highlighted inline. Capture groups are extracted and displayed separately, showing the matched content for each numbered and named group. This uses JavaScript's ECMAScript regex flavor — the same engine that runs in browsers and Node.js. Common flags are supported: g (find all matches, not just the first), i (case-insensitive), m (multiline, making ^ and $ match line boundaries), and s (dotall, making . match newlines). The tool defaults to the global flag. Beyond simple match/no-match testing, seeing capture groups in isolation is the most useful feature for complex patterns. A pattern like (\d{4})-(\d{2})-(\d{2}) on a date string will show group 1 as the year, group 2 as the month, group 3 as the day — immediately confirming your pattern is capturing what you intend. Named groups ((?<year>\d{4})) display with their names rather than numbers. The built-in pattern library covers the most-requested patterns: email, URL, IPv4, phone number, credit card, postal code — useful as a starting point or sanity check against your own patterns.
How to Use Regex Tester Online
- Paste your data into the input field above
- The result appears instantly in the output area
- Click "Copy" to copy the result to your clipboard
Test regular expressions with live highlighting and capture groups. Runs 100% client-side — no data is sent to any server.