Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

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.

Mis à jour le
//
Examples:

Explanation

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

    Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

    Comment utiliser : 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.

    Aussi recherché comme : explain regex, regular expression explained, what does this regex do, regex to english, regex breakdown, regex meaning, understand regex, regex parser.

    Outils complémentaires : 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.
    • Convertisseur de casse — Collez n'importe quel texte et convertissez-le selon l'une des 11 conventions de casse disponibles — de la casse « Title Case » pour les titres à « camelCase » et « snake_case » pour le code.
    • 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.

    Questions fréquentes

    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.
    Puis-je installer Regex Explainer en tant qu’application web et l’utiliser hors ligne ?
    Oui. Regex Explainer est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

    Outils similaires