Regex Tester — Live Match Highlighting & Pattern Library

Test regular expressions with live match highlighting, flags, and a prebuilt pattern library.

About this tool

Test regular expressions instantly with real-time match highlighting. Toggle flags (g, i, m, s, u), inspect all matches with their positions and capturing groups, and choose from a prebuilt Regex Foundry library of common patterns like email, URL, phone, and password validators.

manage_searchRegex Foundry

Skip writing regex from scratch. The built-in Regex Foundry provides verified, ready-to-use patterns for the most common validation tasks — email, URL, phone number, strong password, and more.

Click any pattern in the Foundry to instantly load it into the tester with a sample test string.

Quick Usage Guide

  1. 1Real-time regex testing with live match highlighting
  2. 2Toggle flags: g (global), i (case-insensitive), m (multiline), s (dot-all), u (unicode)
  3. 3Displays all matches with index positions and capturing groups
  4. 4Regex Foundry — prebuilt patterns for email, URL, phone, password, and more
  5. 5Graceful error handling for invalid patterns
  6. 6100% browser-based — your patterns and data stay private

Frequently Asked Questions

help_outlineWhat regex flags does the tester support?

All standard JS regex flags: g (global), i (case-insensitive), m (multiline), s (dotAll — makes . match newlines), and u (unicode).

verifiedDoes it support capturing groups?

Yes. Each match shows its full matched text plus all capturing groups (group 1, group 2, etc.) individually.

quizWhat is the Regex Foundry?

A built-in library of common, ready-to-use patterns — email, URL, phone, password strength, and more. Click any pattern to instantly load it into the tester with a sample string.

account_balance_walletWhat happens if my regex is invalid?

An error message is shown immediately so you can fix the pattern — the tool never crashes.