Here are some common wildcard examples:
-
*- Matches any number of characters (including none).- Example:
*.jpgmatches all JPEG files.
- Example:
-
?- Matches a single character.- Example:
file?.txtmatchesfile1.txt,fileA.txt, but notfile.txt.
- Example:
-
[abc]- Matches any one of the characters inside the brackets.- Example:
file[12].txtmatchesfile1.txtandfile2.txt.
- Example:
-
[a-z]- Matches any one character in the specified range.- Example:
file[a-z].txtmatchesfilea.txt,fileb.txt, etc.
- Example:
-
{}- Matches any of the specified patterns.- Example:
file.{txt,pdf}matchesfile.txtandfile.pdf.
- Example:
These wildcards are often used in command-line interfaces, programming, and file searching.
