c:\@Work\Perl\monks>perl -wMstrict -le "$_ = 'aaab'; print qq{Matched 1 => '$_'} if /^[a]{2,}(?![b])+/; print qq{LastMatch1: '$&'}; " (?![b])+ matches null string many times in regex; marked by <-- HERE in m/^[a]{2,}(?![b])+ <-- HERE / at -e line 1. Matched 1 => 'aaab' LastMatch1: 'aa'