As Hugo van der Sandewrote less than a week ago, regexes execute their alternations in the order you provide them. Thus, the "a" alternation is attempted before the "ab" one.
_____________________________________________________
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart