my $str1 = "2L"; # want to capture 2L my $str2 = "bar.2L"; #want to capture 2L