GUIDEDeep dive
Regex Basics: Classes, Quantifiers, Anchors
Start with character classes and quantifiers: \d digits, \w word characters, + one or more, * zero or more, ? zero or one. Anchors ^ and $ pin the string. Escape special characters.
Common symbols
\d digit, \w word character, \s whitespace.
+ / * / ? control repetition.
Anchors
^ start, $ end.
\b word boundary.
FAQ
What does . match?
Any character except newline by default.
How to match a literal dot?
Escape it as \.
Sources
Related calculators
Regex Practice: 1000 Gamified Match and Replace Cards1000 Python regex cards covering character classes, quantifiers, groups, anchors, search and substitution, in 50 levels with spaced repetition.More guides
Hiragana vs KatakanaRead guideSpaced Repetition and the Forgetting CurveRead guideOn Readings vs Kun ReadingsRead guideAn N5 Kanji Study OrderRead guideKEEP READING
Keep reading
Read in order, or jump to another guide on the same topic.
← PreviousReading map, filter and reduceWhat array methods return, callback arguments and chaining.Next →Groups, Greediness and Lookaround(), (?:), greedy/non-greedy and (?=)/(?<=).