Regex Tester

...
//

Result

cdbbdbsbz

Matches (1)

Full Match 0: dbbd

Groups: ["bb"]

About this Tool

A tool for developers to test and debug regular expressions. Instantly see how your pattern matches against a test string, with results and matches highlighted. It solves the complexity of crafting regex that work as intended without trial and error in code.

How does it work? It creates a RegExp object with your pattern and flags, then uses matchAll() or exec() to find and highlight matches, listing groups.

  1. Enter your regular expression pattern in the first input field.
  2. Optionally, add any flags (like `g`, `i`, `m`) in the flags field.
  3. Provide the string you want to test against in the "Test String" area.
  4. The "Result" box will highlight all matches in real-time.
  5. The "Matches" box will list all matched strings and capture groups.
  • Validating email formats in form inputs.
  • Extracting data from logs or HTML.
  • Searching and replacing in code editors.
  • Real-time match highlighting.
  • Support for regex flags (global, case-insensitive, etc.).
  • Detailed list of all matches and their capture groups.
  • Error handling for invalid regular expressions.

Regular expressions are patterns for matching text, based on formal language theory. They use symbols for quantifiers, groups, etc., enabling powerful string operations like search, validate, extract.

What flags are supported?

g (global), i (insensitive), m (multiline), s (dotall), etc.

Can it show replacements?

This version focuses on matching; future updates may add replace.

Is it JS-specific?

Yes, uses JS RegExp engine.

All calculations and data processing for this tool are performed locally in your browser. We do not send any of your data to our servers, ensuring your information remains private and secure.