Last active
July 9, 2023 19:56
-
-
Save thatisuday/097d38314b9aafd148406220cb0f8ea1 to your computer and use it in GitHub Desktop.
Glob Pattern Matching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pattern | Description | Example Pattern | Matches | |
---|---|---|---|---|
xyz | Match exactly xyz and nothing more | photo.db | photo.db | |
* | Match any 0 or more characters | *s.db | photos.db users.db ... (files with s.db suffix) | |
? | Matches any single character | ?ing.db | king.db ping.db ring.db | |
[...] | Matches one character listed inside the brackets | [pr]ing.txt | ping.txt ring.txt | |
[start-end] | Matches any character from the start till the end of a set. Supported patterns are a-z; A-Z and 0-9 | [m-z]ing.* | ping.db ping.txt ring.db ring.txt | |
[!...] | Matches one character not included in the brackets | [!pr]ing.txt | king.txt | |
[!start-end] | Matches any character not included from the till the end of a set | [!m-z]ing.* | king.db king.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment