|
The following rules apply to wildcard searches:
^ does not match line termination codes (CR/LF) in the input file for insertion, deletion, or replacement.
$ does match a CR/LF sequence in the input file for deletion, but not for insertion or replacement.
* and ? do not match line termination codes (CR/LF). If the search pattern is to extend over more than one line it must explicitly contain $ characters.
The ^ character is legal only as the first character of a search string, unless it is escaped. In any other location, it is treated as part of the text string.
A search string that consists only of a single ^ character is not legal and will be ignored.
The $ character is legal anywhere in the search string.
Two * characters may not be adjacent to each other in the search string, unless one or both are escaped. Only the first * is interpreted as a wildcard command. Any subsequent * characters are treated as part of the text string.
A search string that ends with an * is not legal. The correct method is to end the search string with a ? character.
When processing a Printer Code Template export file (only) the search string will not match any part of a template field tag.
Code |
Description |
---|---|
? |
Match any single character. |
* |
Match any 0 or more characters. |
$ |
Match end of line. |
^ |
Match beginning of line. |
\ |
Next character is literal. Escape the next character (if next character would otherwise be interpreted as a wildcard). |
\xNN |
Insert hexadecimal character, where NN consists of two hexadecimal digits. |
Examples of search strings are as follows:
^Cutter$: Looks for a single line that consists only of Cutter.
^Cutter*$: Looks for a line that starts with Cutter and matches the entire line.
^*Cutter*$: Looks for any line that contains Cutter and matches the entire line.
^Cutter ???*$: Looks for any line that contains Cutter<space> and any three or more characters, matching the entire line.
Cutter: Searches for Cutter anywhere in the file, matching only those six characters and not the entire line where they are found.