@parts = '12abc3ef' =~ /[a-z]+|\d+/g; print "@parts\n"; __END__ 12 abc 3 ef