Conceptual

Character Classes and Quantifiers in Regex

A character class matches one character from a set (\d, \w, [a-z]) and a quantifier says how many times to repeat it (*, +, ?, {2,4}). Together they are how a pattern describes a shape of text — a 5-digit zip, a 3-letter code — without listing every string that fits.