my $text = 'my model TT1986 is 6 months old"; #my $text = 'my model TT1986 is 12 months old"; $text =~ /(\d?\d)/; print $1;