ToolfyToolfy
ValidatorsRegex Tester & Debugger

Regex Tester & Debugger

Build, test, and debug regular expressions interactively. Highlights all matches inline with clickable detail panels showing capture groups, named groups, and position. Auto-explains every token in your pattern (anchors, quantifiers, lookaheads, character classes, and more). Supports replace with group references ($1, $<name>) and extract with custom format templates. Includes a test-case suite to verify full-match, any-match, or no-match expectations. Supports all JavaScript regex flags: g, i, m, s, u.

Pattern
//
Test Input

Regex Tester & Debugger guide

Build and debug JavaScript regular expressions with live matches, capture-group details, replacement previews, and token explanations. The tester is designed for practical regex work, from quick validation patterns to multi-case debugging.

Key features

  • Highlight regex matches and inspect capture groups
  • Explain anchors, groups, character classes, quantifiers, and escapes
  • Preview replacements and extract matched values
  • Create test cases for expected full matches, partial matches, or no matches

Common use cases

  • Debug a validation pattern before adding it to application code
  • Understand a regex copied from documentation or an existing project
  • Check replacement output before running it over real text

Frequently asked questions

Which regex flavor does this tester use?

It uses JavaScript regular expressions, including common flags such as g, i, m, s, and u.

Can it explain a regular expression?

Yes. The tool breaks down tokens such as groups, anchors, quantifiers, character classes, and escapes.

Can I test capture groups?

Yes. Matches include capture-group details so you can inspect numbered and named groups.