Placeholders for Filters
The following placeholders can be used for filtering files and folders:| Placeholder | Represents in filter |
|---|---|
| * | Zero or more characters. |
| ? | Any single character. |
| # | Any single digit (0 - 9). |
| [CharacterList] | Any single character in CharacterList. |
| [!CharacterList] | Any single character not contained in CharacterList. |
The special characters left bracket ([), question mark (?), the character #, and asterisk (*) must be enclosed in square brackets to be used for comparison. The right square bracket (]) cannot be used within a group of characters to compare. However, it can be specified outside a group as a single character.
You can also specify a range of characters in CharacterList by entering the highest and lowest values of the range separated by a hyphen (-). [A-Z] will match, for example, if the corresponding character position in CharacterList contains a letter in the range from A to Z. Multiple ranges can be specified consecutively within one pair of brackets without additional separators.
Additional important rules for using placeholders:
- An exclamation mark (!) at the beginning of CharacterList means a match occurs when any character except those in CharacterList is found in the filter. If the exclamation mark is used outside the square brackets, it serves as a placeholder character by itself.
- A hyphen (-) can appear either at the beginning (after an exclamation mark, if present) or at the end of CharacterList to serve as a placeholder character by itself. In any other position, the hyphen indicates a character range.
- When specifying a character range, the characters must be listed in ascending order (from lowest to highest). Thus, [A-Z] is a valid pattern and [Z-A] is not.
Examples:
| Type of match | Filter | Match | No match |
|---|---|---|---|
| Multiple characters | a*a | aa, aBa, aBBBa | aBC |
| *ab* | abc, AABB, Xab | aZb, bac | |
| Special characters | a[*]a | a*a | aaa |
| Multiple characters | ab* | abcdefg, abc | cab, aab |
| Single characters | a?a | aaa, a3a, aBa | aBBBa |
| Single digits | a#a | a0a, a1a, a2a | aaa, a10a |
| Character range | [a-z] | f, p, j | 2, & |
| Outside the range | [!a-z] | 9, &, % | b, a |
| No digits | [!0-9] | A, a, &, ~ | 0, 1, 9 |
| Combination | a[!b-m]# | An9, az0, a99 | abc, aj0 |





