use strict;
use warnings;

my @cases = qw(TF=22; BT=22; =220;);
for my $str (@cases) {
    my @matches = $str =~ /^TF=(\d{1,2});$/;
    if (@matches) {
        print "Got it: $str -> $matches[0]\n";
    } else {
        print "Nothing to do with: $str\n";
    }
}