$str="taaaaaaaa"; $str=~/(ta+)/; print "$1\n"; $str=~/(ta+?)/; print "$1\n";