ToolBark
Developer

Regex Tester

Test regular expressions with live match highlighting.

//gi
Preview
Email me at hello@toolbark.com or support@toolbark.com.
2 matches
hello@toolbark.comat index 12
support@toolbark.comat index 34
About

The Regex Tester lets you write, test, and debug regular expressions against real sample text in real time, with each match highlighted as you type. Whether you are extracting emails from a log file, validating form inputs, or learning regex syntax for the first time, this interactive tester gives you instant visual feedback without needing a code editor.

FAQ
Which regex flavour does this tester use?+

The tester uses JavaScript's built-in RegExp engine, which closely matches the behaviour you will get in browsers and Node.js. For server-side work in Python, PHP, or Go you may encounter minor differences around lookbehinds, Unicode properties, or named groups, but the core syntax is the same.

How do I match multiple lines with a regex?+

Enable the Multiline (m) flag so that ^ and $ match the start and end of each line rather than the whole string. If you also want the dot (.) to match newline characters, enable the Dotall (s) flag at the same time.

What does the global (g) flag do?+

Without the global flag, the regex engine stops after finding the first match. Adding the g flag makes it find all non-overlapping matches in the input, which is what you usually want when extracting multiple values.

Can I use named capture groups in the tester?+

Yes. JavaScript supports named capture groups with the syntax (?<name>...). The tester displays each named group alongside its matched value, which makes complex patterns far easier to read and debug.

Related tools