Quantifiers and Greed

Regular expression quantifiers are typically greedy. That is, when faced with a quantifier, the engine matches as much as it can while still satisfying the rest of the pattern. For instance: The regular expression matches from the first less-than sign to the last greater-than sign. In effect, the .* matches everything after the first less-than … Read more