Regex Tester

Client-Side New

Write and test regular expressions with instant visual feedback. See matches highlighted in your test string as you type, view detailed capture groups for each match, and toggle flags for global, case-insensitive, and multiline modes. A must-have tool for developing and debugging regex patterns for any programming language.

//
Flags:
0 matches

About Regex Tester

  • Real-time testing — Matches update as you type
  • Capture groups — See individual group matches for each result
  • Flags — Toggle global, case-insensitive, and multiline modes
  • All processing happens locally in your browser

How to Use

  1. 1

    Write Your Pattern

    Enter a regular expression pattern in the input field. The pattern is shown between / delimiters.

  2. 2

    Set Flags

    Toggle flags: g (global - find all), i (case insensitive), m (multiline).

  3. 3

    Enter Test Text

    Type or paste the text you want to test your regex against. Matches highlight in real-time.

  4. 4

    Review Matches

    See highlighted matches in context and detailed match information including capture groups.

Examples by Niche

Email Validation

Pattern: [\w.+-]+@[\w-]+\.[\w.-]+ — Matches email addresses in a block of text

Extract Numbers

Pattern: \d+\.?\d* — Finds all numbers including decimals in strings like "Price: $19.99 qty: 3"

HTML Tag Matching

Pattern: <(\w+)[^>]*>(.*?)</\1> — Matches HTML tags and captures tag name and content as groups

Frequently Asked Questions

Does this support all regex syntax?

This tool uses JavaScript's native RegExp engine, which supports most standard regex features including character classes, quantifiers, lookaheads, lookbehinds, named groups, and Unicode properties.

What are regex flags?

Flags modify how the regex engine processes patterns. "g" (global) finds all matches, "i" (case insensitive) ignores letter case, and "m" (multiline) makes ^ and $ match line boundaries instead of string boundaries.

What are capture groups?

Capture groups are portions of a pattern enclosed in parentheses. They allow you to extract specific parts of a match. For example, in the pattern (\d+)-(\d+), each set of digits is captured separately and shown in the match details.

Will my regex work the same in Python, Java, or other languages?

Most basic regex syntax (character classes, quantifiers, alternation) is universal across languages. However, advanced features like lookbehinds, named groups, and Unicode properties differ between engines. This tool uses JavaScript RegExp, so test in your target language for edge cases involving those features.

Related Tools

Related Articles