Pattern lab

Regex Tester & Explorer

Debug email validators, log scrapers, named groups, and Unicode classes with instant highlights, match tables, and precise execution timing. Switch flags, load presets, and export proof straight into pull requests.

ES2023-compatible Match table & JSON Named group detector Latency benchmark

Author · Pawan

Reviewer · Kushal Singh

Enter pattern without slashes. Supports named captures, Unicode properties, lookarounds, and sticky mode.

Flags

Use multiline logs, JSON, or CSV. We run RegExp.prototype.exec safely and prevent runaway loops.

Presets

Results & highlights

Live counts, named groups, and execution benchmarks.

Live

Run the tester to populate matches, highlights, and export options.

Implementation checklist

  1. Scope inputs: Anchor patterns with ^ and $ when matching entire strings to avoid partial hits.
  2. Escaping: Escape user-entered literals with String.raw or helper functions to prevent regex injection.
  3. Unicode: Turn on the u flag when using property classes like \p{L}.
  4. Performance: Watch execution time for catastrophic backtracking; simplify quantifiers if latency spikes.

FAQ

Can I test multiline logs?

Yes. Enable the m flag so ^ and $ anchor against every line inside the textarea.

How do I avoid catastrophic backtracking?

Prefer atomic groups, lazy quantifiers, or explicit character sets ([A-Za-z0-9]) when parsing long strings.

What does the CLI button do?

It copies a Node.js one-liner using your pattern, flags, and sample text so you can paste a repro into Slack or code review.

References

  1. ECMAScript® 2024 – Regular Expressions
  2. MDN Web Docs – Regular expressions
  3. OWASP – ReDoS guidance
  4. regular-expressions.info – Quick start

Author & Reviewer

Pawan designs developer-first calculators and linting helpers. His regex presets mirror the most common support tickets—emails, URLs, IDs—so teams can copy-paste working patterns.

Reviewed by Kushal Singh, AI Research Program Manager, for accuracy across ECMAScript 2024 features.