Rapid DevTools

What is a Regex Tester?

A regular expression (regex) is a pattern used to search, match, and manipulate text. Regex is incredibly powerful but notoriously hard to read and debug. A regex tester lets you build a pattern and immediately see what it matches against sample text, so you can iterate quickly instead of guessing.

This tool uses your browser's built-in JavaScript regex engine. As you type, matches are highlighted and capture groups are listed in real time. Nothing is sent to a server.

How to Use This Regex Tester

  1. Enter your regular expression in the pattern field.
  2. Paste sample text to test against in the input area.
  3. Toggle flags (g, i, m) to match your use case.
  4. Review highlighted matches and capture groups in real time.

Worked Example

Extract dates in YYYY-MM-DD format from log lines:

Pattern

\d{4}-\d{2}-\d{2}

Matches in text

2026-07-02 in [2026-07-02] Server started

Common Regex Patterns

📧 Email

[\w.+-]+@[\w-]+\.[\w.-]+

đŸ”ĸ Digits only

^\d+$

🌐 URL

https?:\/\/[^\s]+

📅 Date (YYYY-MM-DD)

\d{4}-\d{2}-\d{2}

Understanding Regex Flags

  • g — global: find all matches, not just the first.
  • i — ignore case: match regardless of upper/lowercase.
  • m — multiline: ^ and $ match line starts/ends.
  • s — dotall: . also matches newlines.
  • u — unicode: enable full unicode matching.
  • y — sticky: match only from lastIndex.

Frequently Asked Questions

Does this support capture groups?

Yes. Any parenthesized groups in your pattern are extracted and shown per match so you can confirm what each group captured.

Which regex syntax is supported?

The JavaScript (ECMAScript) flavor. Patterns that work here will behave identically in browser and Node.js code.

Is my data private?

Completely. Your pattern and test string never leave your browser — there is no server call.

Why does my pattern work here but not in Python?

This tool uses JavaScript (ECMAScript) regex syntax. Lookahead, lookbehind, and flag behavior can differ between languages — always test in your target runtime.

What is a capture group?

Parentheses in a pattern create a capture group — a sub-match extracted separately. Useful for parsing emails, dates, or URL components from text.

🔗 Related Tools