Placeholder for text
| Placeholder | Represents in the filter |
|---|---|
| * | Zero or more characters. |
| ? | Any single character. |
| # | Any single digit (0 - 9). |
| [CharacterList] | Any single character in CharacterList. |
| [!CharacterList] | Any single character that is not in CharacterList. |
The special characters left bracket ([), question mark (?), the character # and the asterisk (*) must be enclosed in square brackets so that they can be used for a comparison. The right square bracket (]) cannot be used within a group of characters to be compared. However, it can be specified as a single character outside of a group.
You can also specify a range of characters in CharacterList by specifying the largest and smallest value of the range separated by a hyphen (-). [A-Z] for example, results in a match if the corresponding character position in CharacterList contains a letter in the range from A to Z. You can specify multiple ranges consecutively within a pair of brackets without further delimiters.
Further important rules for using placeholders:
- An exclamation mark (!) at the beginning of CharacterList means that a match results if any character other than the characters in CharacterList is found in the filter. If the exclamation mark is used outside of square brackets, it serves as a wildcard character for 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 wildcard character for itself. In any other position, the hyphen serves to designate a character range.
- When a character range is defined, the characters must be specified in ascending sort order (from lowest to highest). Accordingly, [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 |