The preference of the "regular expression" engine to match the leftmost occurrence of a "pattern", then given a position at which a match will occur, the preference for the longest match (presuming the use of a "greedy" quantifier). See perlre for much more on this subject.