Regex Explainer
Paste any regex and get a plain English explanation. Understand anchors, groups, quantifiers instantly.
Enter a regex pattern above to see the explanation
How to Use Regex Explainer
- Paste your regular expression in the input field
- See each part explained in plain English instantly
- Understand groups, quantifiers, and special characters
- Hover over components for detailed explanations
- Try examples like email validation or URL matching
About Regex Explainer
Paste any regular expression and get a clear, plain English explanation of what it does. Each component is broken down - anchors (^ $), character classes ([a-z]), quantifiers (*, +, ?), groups, lookaheads, and special sequences. Stop guessing what that cryptic regex means. Perfect for learning regex, debugging patterns, or understanding code you inherited.
Frequently Asked Questions
What regex flavor is supported?
JavaScript regex syntax, which is similar to most other languages. Features like lookbehinds may vary across languages.
Can I test my regex here?
This tool explains regex. For testing with actual strings, use our Regex Tester tool which highlights matches in your text.
What are capture groups vs non-capturing groups?
Capture groups (...) save matched text for backreferences or extraction. Non-capturing groups (?:...) group patterns without capturing. Use non-capturing when you don't need the match.
What does \d, \w, \s mean?
These are shorthand character classes. \d matches any digit (0-9), \w matches word characters (letters, digits, underscore), \s matches whitespace (space, tab, newline).
What's the difference between * and + quantifiers?
The asterisk (*) matches zero or more occurrences, while plus (+) matches one or more. For example, a* matches "", "a", "aa", but a+ requires at least one "a".
How do I match a literal dot or bracket?
Escape special characters with a backslash. Use \. for a literal dot, \[ for a bracket, \\ for a backslash itself.