TecnoCrypter Logo

Regex Tester

Test regular expressions

Expresión Regular
//
Texto de Prueba

Regex Tester: Test Regular Expressions in Real Time

Regular expressions (regex) are one of the most powerful tools for text manipulation and validation. Our tester allows you to build and validate patterns interactively, with immediate visual feedback.

Compatible with the JavaScript regex flavor (ECMAScript). Includes highlighted matches, capture groups, flags (g, i, m, s, u), and step-by-step explanation of your pattern.

Ideal for validating emails, URLs, phone numbers, dates, or extracting data from unstructured text. All computation happens in the browser — no data leaves your device.

How does it work?

  1. 1
    Write your regex

    Enter the pattern in the regex field without delimiters (e.g., use '\d+' not '/\d+/g').

  2. 2
    Add flags

    Select the flags you need: g (global), i (case-insensitive), m (multiline), s (dotall), u (unicode).

  3. 3
    Enter test text

    Paste the text where you want to search. Matches will be highlighted and shown with their capture groups.

Frequently Asked Questions

What's the difference between .* and .+?

.* matches zero or more of any character, while .+ requires at least one. Both are greedy — they consume as much as possible. Use .*? or .+? for lazy matching.

How do I validate an email with regex?

A practical pattern is: ^[^\s@]+@[^\s@]+\.[^\s@]+$. Don't use overly strict patterns — the official RFC 5322 for emails is very complex. Better validate format and confirm via email.

Why is my regex slow with certain input?

You may have catastrophic backtracking. Patterns like (a+)+ or (.*)* can cause exponential explosion. Use possessive quantifiers or atomic groups, or restructure the pattern.