Live
No signup

Regex Tester

Test regular expressions.

Pattern

JavaScript flavor (ECMAScript). No /…/ delimiters.

//

Test text

2 match(es)
Contact: john@example.com or jane.doe+work@startup.io Phones: +1 555-1234, +52 55 1234 5678 URLs: https://zonutility.com/herramientas Date: 2026-04-24 IPv4: 192.168.1.42

Match details

  • john@example.com

    @9
  • jane.doe+work@startup.io

    @29

Replace (optional)

How this tool works

Regular expressions (regex) are a compact language to describe text patterns. A single line can validate emails, extract URLs, parse logs or transform CSV. The catch: debugging them by eye is brutal.

This tester compiles your regex with JavaScript's native engine, highlights each match, lists captured groups and lets you live-test replacements. It supports g (global), i (case-insensitive), m (multiline), s (dotall) and u (unicode) flags.

How to use it, step by step

  1. 1

    Write your pattern

    Without the /…/ slashes. Just the regex body.

  2. 2

    Toggle flags

    g for all matches; i for case-insensitive; m so ^/$ work per line.

  3. 3

    Paste test text

    The more representative, the better. Edge cases: empty strings, unicode, line breaks.

  4. 4

    Inspect groups

    Captured groups are indexed. Use (?<name>...) for named groups.

Frequently asked questions

Which regex flavor?
JavaScript ECMAScript. Syntax differs slightly from PCRE (PHP, grep) or POSIX. When porting, watch out for lookbehinds, \K and backreferences.
Any ReDoS protection?
Chrome's engine is fairly robust, but catastrophic patterns (a+a+)+ can hang the tab. Keep that in mind before pasting unknown regexes.
Can I use it for emails?
Yes, but the 'perfect' email regex is huge. For 99% of cases: ^\S+@\S+\.\S+$ then validate with a real send.