char *str is the string to be compared.
char *exp is the prevalidated shell expression (wildcard pattern) to compare against.