ToolDashy

Regex Tester

Test a regular expression against sample text, with matches highlighted live, capture groups shown, and clear errors for invalid patterns.

//gi

2 matches

Contact us at hello@example.com or support@example.org.

Everything you enter is processed in your browser and isn't sent to our servers.

How to use regex tester

  1. 1Enter a regular expression pattern.
  2. 2Toggle flags: global, case-insensitive, multiline, dot-matches-newline.
  3. 3Paste or type the text you want to test against.
  4. 4Matches highlight live, with capture groups listed below.

About this tool

This tool uses your browser's native JavaScript RegExp engine — the exact same engine that runs your regex in production if you're testing a pattern for JavaScript code, so what you see here is what you'll get.

Matches are found using the global flag internally (added automatically if you don't set it) so every occurrence is shown, not just the first. Numbered capture groups and named groups (using the `(?<name>...)` syntax) are both displayed for every match.

An invalid pattern — like an unmatched parenthesis or bracket — shows the JavaScript engine's own error message instead of silently failing, so you can see exactly what's wrong.

Frequently asked questions

Yes — this uses your browser's built-in RegExp, the same engine JavaScript code runs. Other languages (Python, PCRE, .NET, etc.) have their own regex engines with some syntax differences, so a pattern tested here is guaranteed to match JavaScript behavior specifically, not necessarily every other language's regex flavor.

Related tools