$pins2 =~ s/\*$/.*/; # make key into regex string if trailing *