background image

Free Developer Tool - runs 100% in your browser

Regex Tester

//

Scroll down to learn more about this tool

Test regular expressions online with live highlighting

This regex tester evaluates your regular expression against sample text as you type, highlighting every match in place and listing capture groups - including named groups - below. It uses the browser's native JavaScript regex engine, so what matches here matches in your Node.js or frontend code exactly.

Regex flags reference

  • g - global: find all matches, not just the first.
  • i - case-insensitive matching.
  • m - multiline: ^ and $ match at line boundaries.
  • s - dotall: . also matches newlines.
  • u - Unicode mode, enabling \p{…} property escapes.
  • y - sticky: match only from lastIndex.

Handy patterns to try

  • Email: [\w.+-]+@[\w-]+\.[\w.]{2,}
  • ISO date: \d{4}-\d{2}-\d{2}
  • IPv4 address: \b(?:\d{1,3}\.){3}\d{1,3}\b
  • Named group: (?<year>\d{4})-(?<month>\d{2})

Regex testing locally in the browser means your sample data - logs, customer records, source code - is never uploaded anywhere. Related tools: text diff checker andSQL formatter.

More free developer tools