|
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 only legal as the first character of a search string, unless escaped. In any other location it will be treated as part of the text string.
A search string consisting 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 * will be interpreted as a wildcard command. Any subsequent * characters will be treated as part of the text string.
A search string that ends with a * 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:
^Cutter$: Looks for a single line that consists only of Cutter.
^Cutter*$: Looks for a line starting with Cutter and matches the entire line.
^*Cutter*$: Looks for any line containing Cutter and matches the entire line.
^Cutter ???*$: Looks for any line containing 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.