Following splitting, each field is scanned for the characters *, ?, (, and [unless the -f option has been set. If one of these characters appears, then the word is regarded as a pattern. Each file name component that contains any pattern character is replaced with a lexicographically sorted set of names that matches the pattern from that directory. If no file name is found that matches the pattern, then that component of the filename is left unchanged. If FIGNORE is set, then each file name component that matches the pattern defined by the value of FIGNORE is ignored when generating the matching filenames. The names . and .. are also ignored. If FIGNORE is not set, the character . at the start of each file name component will be ignored unless the first character of the pattern corresponding to this component is the character . itself. Note, that for other uses of pattern matching the / and . are not treated specially.
A pattern-list is a list of one or more patterns separated from each other with a & or |. A & signifies that all patterns must be matched whereas | requires that only one pattern be matched. Composite patterns can be formed with one or more of the following sub-patterns:
?(pattern-list) | Optionally matches any one of the given patterns. |
*(pattern-list) | Matches zero or more occurrences of the given patterns. |
+(pattern-list) | Matches one or more occurrences of the given patterns. |
@(pattern-list) | Matches exactly one of the given patterns. |
!(pattern-list) | Matches anything except one of the given patterns. |
Each sub-pattern in a composite pattern is numbered, starting at 1, by the location of the (within the pattern. The sequence n, where n is a single digit and n comes after the n-th. sub-pattern, matches the same string as the sub-pattern itself.
52.15.223.168