The shexp_valid function validates a specified shell expression named by exp. Use this function to validate a shell expression before using the function shexp_match to compare the expression with a string.
int shexp_valid(char *exp);
The constant NON_SXP if exp is a standard string.
The constant INVALID_SXP if exp is a shell expression but is invalid.
The constant VALID_SXP if exp is a valid shell expression.
char *exp is the shell expression (wildcard pattern) to be validated.