Perform wildcard match of a filename against a wildcard pattern. The wildcard pattern may comprise ordinary characters or special matching characters, as given below: ? Any single character. * Zero or more of any character. [abc] Any character from the set {a,b,c}. [^abc] Any character BUT the ones from the set {a,b,c}. [!abc] Ditto. [a-zA-Z] Matches single character, which must be one of a-z or A-Z. [^a-zA-Z] Matches single character, which must be anything other than a-z or A-Z. [!a-zA-Z] Ditto. pat1|pat2 Match sub-pattern pat1 or pat2. pat1,pat2 Ditto. (pat1|pat2) Match sub-pattern pat1 or pat2; patterns may be nested. (pat1,pat2) Ditto. The special characters may be escaped to treat them as ordinary characters. Matching may be influenced by a number of flags: FILEMATCH_FILE_NAME No wildcard can ever match / FILEMATCH_NOESCAPE Backslashes don't quote special chars FILEMATCH_PERIOD Leading . is matched only explicitly FILEMATCH_LEADING_DIR Ignore /... after a match FILEMATCH_CASEFOLD Compare without regard to case
|