Extracting email addresses
Set Pattern to \b\w+@\w+\.\w+\b with the global flag on, paste "Contact us at info@example.com or sales@example.com", and Run test lists both addresses with their index (14 and 34) and full match.
Test regular expressions online and see every match and capture group live — free regex tester.
About
Runs a regular expression against sample text and lists every match, its position and its capture groups.
Developers use it to build and debug a pattern before dropping it into code, while data analysts use it to check that a pattern captures the right groups from messy text before writing a full extraction script. It's one of many free developer tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.
Examples
3 worked examples
Set Pattern to \b\w+@\w+\.\w+\b with the global flag on, paste "Contact us at info@example.com or sales@example.com", and Run test lists both addresses with their index (14 and 34) and full match.
Use pattern (\d{4})-(\d{2})-(\d{2}) against "2026-09-28" to get one match with three capture groups: 2026, 09 and 28.
Search for "hello" with the ignore case flag on against "Hello there, HELLO again" to match both — Hello at index 0 and HELLO at index 13 — despite the different capitalization.
FAQ
Quick answers to common questions about the Regex Tester.
It runs a regular expression against sample text and lists every match, its position, and its capture group values.
Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.
Yes. Matching happens entirely in your own browser using JavaScript's built-in RegExp engine — nothing you type is sent to a server.
Global finds every match instead of stopping at the first. Ignore case matches letters regardless of case. Multiline makes ^ and $ match the start and end of each line rather than the whole string. Dot matches newline makes the . token also match line-break characters.
It needs the g flag to step through and collect every match. If you turn "global" off, the tool still scans but stops after the first match, matching what a non-global regex would find.
The tool automatically advances past a zero-length match so it doesn't get stuck in an infinite loop, and still reports it as a match.
Yes, it stops at 5,000 matches to keep the page responsive, and tells you if it stopped early.
Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.
Did Regex Tester work for you?