Esta página aún no está traducida al español, así que la mostramos en inglés.

Regex Explainer — What Does This Regular Expression Do?

Paste any regular expression and see what every part means — in plain English, token by token: character classes, groups and named groups, quantifiers (greedy and lazy), anchors, alternation, lookahead and lookbehind, backreferences and flags.

Actualizado el
//
Examples:

Explanation

    Want to try it on text? Open it in the Regex Tester.

    Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

    Cómo usar: Regex Explainer

    1. Paste a regular expression between the slashes (with or without the surrounding /…/) and add flags like gi.
    2. The explanation lists every part in order, with nested groups indented.
    3. Click an example to see common patterns explained.
    4. Test it on real text with Regex Tester.

    Reading a regular expression

    TokenMeaning
    .any character except a line break
    \d \w \sa digit, a word character (letter, digit, underscore), whitespace; uppercase means “not”
    [abc] [^abc] [a-z]one of these, none of these, a range
    * + ? {2,5}0 or more, 1 or more, optional, between 2 and 5 times; add ? to make it lazy
    ^ $ \bstart, end, word boundary
    ( ) (?: ) (?<name> )capturing, non-capturing and named groups
    (?= ) (?! ) (?<= ) (?<! )lookahead, negative lookahead, lookbehind, negative lookbehind
    a|ba or b

    The explainer follows JavaScript regex syntax, which is also very close to PCRE (PHP), Python, Java and .NET for everyday patterns.

    Related: Regex Tester, Find and Replace, AI prompts for developers.

    También se busca como: explain regex, regular expression explained, what does this regex do, regex to english, regex breakdown, regex meaning, understand regex, regex parser.

    Herramientas que combinan con: Regex Explainer

    • Text Compare — Paste two versions of a text to see exactly what changed: added and removed lines and the changed words inside them, highlighted side by side or in one view.
    • Remove Duplicate Lines — Paste a list to remove duplicate lines instantly.
    • Convertidor de mayúsculas y minúsculas — Pega cualquier texto y conviértelo entre 11 estilos de mayúsculas y minúsculas: desde «Title Case» para titulares hasta «camelCase» y «snake_case» para código.
    • JSON Path Finder — Paste a webhook payload or API response, click any value and copy its exact path — for JavaScript, JSONPath, jq, Python, PHP, n8n and Make.

    Preguntas frecuentes

    How do I understand a regular expression?
    Paste it here: each token is explained in plain English in order, with groups nested, so you can read the pattern step by step.
    What does (?: … ) mean in regex?
    A non-capturing group: it groups tokens (for example to apply a quantifier) without saving the match as a numbered group.
    What is the difference between greedy and lazy?
    Greedy quantifiers (*, +, {n,}) match as much as possible; adding ? (*?, +?) makes them lazy, matching as little as possible.
    Which regex flavor is used?
    JavaScript (ECMAScript), including named groups, lookbehind and the u, s, y and d flags. Most of it applies to PCRE, Python and Java too.
    ¿Puedo instalar Regex Explainer como aplicación web y utilizarla sin conexión?
    Sí. Regex Explainer es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

    Herramientas relacionadas