if (my @match = $text =~ /([A-Za-z\s]*)([0-9]{1,2})[%])/) { # do stuff here. }