Wildcards

 

 

 

A wildcard is a character that can be used in a search term or filter to represent one or more unknown characters. Wildcard characters differ depending upon what is being searched.

 

Searching Files

Asterisk * matches a string of zero, one, or more unknown characters.

Example, *.* will match any file name with any file extension.

Example, *.txt will match any file name with a .txt extension.

Question Mark ? matches any single unknown character.

Example, File????.* would match FileName.txt or File2025.csv but would not match FileSample.txt or File125.csv.

Square Brackets [ ] can be used to match any single character within the specified range or set.

Example, File[A-Z].* would match FileA.txt or FileB.csv but would not match File1.txt or File2.csv.

Example, File[135].* would match File1.txt or File5.csv but would not match File2.txt or FileA.csv.

Square Brackets with Exclamation Point [ ! ] can be used to match any single character not within the specified range or set.

Example, File[!A-Z].* would match File2.txt or File8.csv but would not match FileA.txt or FileB.csv.

Example, File[!135].* would match File8.txt or FileA.txt but would not match File3.txt or File5.csv.

Searching Database Information

Percent Sign % matches a string of zero, one, or more unknown characters.

Example, % will match any word or phrase with any number and type of characters.

Underscore _ matches any single unknown character.

Example, Column_ will match Columns or Column5 but will not match ColumnName or Column15.

Example, Column__ will match Column A or Column15 but will not match ColumnName or Column5.

Square Brackets [ ] can be used to match any single character within the specified range or set.

Example, Sample[A-Z] would match SampleA or SampleB but would not match Sample1 or Sample2.

Example, Sample[135] would match Sample1 or Sample5 but would not match Sample2 or SampleA.

Square Brackets with Caret [ ^ ] can be used to match any single character not within the specified range or set.

Example, Sample[^A-Z] would match Sample2 or Sample8 but would not match SampleA or SampleB.

Example, Sample[^135] would match Sample8 or SampleA but would not match Sample1 or Sample5.

 


Copyright © 2024 pasUNITY, Inc.

 

Send comments on this topic.



Created with an evaluation copy of HelpSmith.
To remove this notice, you should purchase the full version of the product.