#!/usr/bin/perl use strict; use warnings; my $string = "foo 1foo foo2 3foo4 foo5bar 87"; $string =~ s/\d*[a-z]\d*//g; print "$string\n";