Regex Explainer
Paste any regular expression to see what each token means in plain English — anchors, character classes, groups, quantifiers, alternation and lookarounds — and test it against your own text.
Valid pattern · 15 tokens · flags: case-insensitive
^the start of the string (or line with the m flag)(?<user>start of capturing group 1, named "user"[\w.+-]one character from the set: wor, d, to, c, hars, .+-+the previous item one or more times (greedy: as many as possible))end of the group@the text "@" exactly(start of capturing group 2[\w-]one character from the set: wor, d, to, c, hars, -+the previous item one or more times (greedy: as many as possible)\.a literal dot)end of the group+the previous item one or more times (greedy: as many as possible)[a-z]one character from the set: a, to, z{2,}the previous item at least 2 times (greedy: as many as possible)$the end of the string (or line with the m flag)
hello.world+dev@devae.co not an email
Need match groups and replace? Use the regex tester.
How it works
A small tokenizer walks the pattern and labels each construct: literal, escape, class, group, quantifier, anchor, alternation, lookaround.
Groups are explained with their number or name so back-references make sense.
Flags (g, i, m, s, u, y) are explained separately, and the test area runs the same pattern with your flags.
Nothing is sent anywhere; the explanation is produced in your browser.
Save snippets like this to your DEVAE profile and share them with collaborators. Free for individuals.
Sign up freeFrequently asked questions
Paste it above. The explainer reads the pattern left to right and describes every token, which is usually enough to understand a regex someone else wrote.
Greedy quantifiers (*, +, ?, {n,m}) match as much as possible; adding ? after them makes them lazy so they match as little as possible.
(?=…) asserts that what follows matches, without consuming it. (?!…) asserts it does not. Lookbehinds (?<=…) and (?<!…) do the same for what precedes.
Yes. The test area below the explanation highlights matches using the flags you set. For a match-by-match view use the regex tester.
