PrimeUtil

Regex Tester

Free regex tester online — no signup required. Test JavaScript regular expression patterns against sample text with live highlighting, capture groups, and flag support. 100% client-side.

/

Features

  • Real-time match highlighting as you type
  • Supports all standard regex flags: g, i, m, s
  • Shows total match count and positions
  • Capture group details with group index and value
  • Clear error messages for invalid patterns
  • Works with complex patterns including lookaheads and named groups

Frequently Asked Questions

What is a regular expression (regex)?
A regex is a pattern for matching text: literals, character classes, quantifiers, groups, and anchors. It is used for validation, search, and extraction in code and tools.
What do the g, i, m, and s flags do?
g = all matches, not just the first; i = ignore case; m = ^ and $ match line boundaries; s = dot matches newlines. Toggle flags here to see how behavior changes.
Does this regex tester use JavaScript syntax?
Yes. Patterns follow JavaScript RegExp rules, which is what browsers and many stacks use. Small differences exist versus PCRE or Python—test critical patterns in your target environment too.
Why is my regex not matching?
Check anchors (^ $), greediness, escaping special characters, and flags. A typo or wrong flag (e.g. missing i for case) is the most common cause—use the live highlights and group panel to debug.

From our blog