str match, consider the different cases of '*'