How to use the Regex Explainer
- Paste a regular expression between the slashes (with or without the surrounding
/…/) and add flags likegi. - The explanation lists every part in order, with nested groups indented.
- Click an example to see common patterns explained.
- Test it on real text with Regex Tester.
Reading a regular expression
| Token | Meaning |
|---|---|
. | any character except a line break |
\d \w \s | a 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 |
^ $ \b | start, end, word boundary |
( ) (?: ) (?<name> ) | capturing, non-capturing and named groups |
(?= ) (?! ) (?<= ) (?<! ) | lookahead, negative lookahead, lookbehind, negative lookbehind |
a|b | a 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.
Also searched as: explain regex, regular expression explained, what does this regex do, regex to english, regex breakdown, regex meaning, understand regex, regex parser.
Tools that pair well with the 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.
- Case Converter — Paste any text and convert it between 11 letter cases — from Title Case for headlines to camelCase and snake_case for 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.