my $text = "John P5ete Andrew Richard58 Nic4k Le7on5"; my @names = $text =~ /[^\W\d]*\d[^\W\d]*/g; print "@names\n";