developer validator

Regex Tester

Test regex patterns against sample text with live matches and errors.

Results

Processing…
Pattern status
Processing...
Matches / errors
Processing...

Rules & checks

Uses JavaScript RegExp constructor with provided flags.

Returns compilation errors if the pattern is invalid.

Shows matched groups when available.

When to use it

  • Test patterns before merging input validation
  • Debug production errors caused by malformed regex
  • Validate search filters or routing rules in a safe sandbox

Common errors

  • Unescaped backslashes
  • Unclosed groups
  • Unsupported flags

Tips

  • Escape backslashes (\\d instead of \d in some contexts)
  • Start with simpler patterns to narrow down errors

Examples

Valid pattern

  • Pattern: \d{3}
  • Sample: Order 123 ships
  • Matches: 123

Invalid pattern

  • Pattern: ([a-z
  • Error: Unterminated group

FAQs

Do you store my patterns or samples?
No. Everything stays in your browser.
Which flavor is used?
JavaScript RegExp. Behavior may differ from PCRE or other engines.

Related validators

For quick testing. Always mirror patterns and tests in your codebase.