$_='aaab'; print "Matched 1=>$_\n" if /^[a]{2,}(?![b])+/; print "LastMatch1:$&\n"; print "Matched 2=>$_\n" if /^[a]{2,}/; print "LastMatch2:$&\n";