Russell Bateman
last update:
Global-based expressions, also loosely known as glob, are less powerful than regular expressions. Use of glob is most apparent in UNIX and Linux.
Expression | Sample string | Sample strings that match |
---|---|---|
* | "abc*", "*abc" or "*abc*" | "abcdefghij", "01234abc", "01234abc56789" |
? | "a?c" | "a1c" |
[abc] | "a[bB]c" | "abc", "aBc" |
[!abc] | "a[!bB]c" | "azc", "a1c", "aAc" |
[0-9] | "abc[0-9]" | "abc6" |
[!0-9] | "abc[!a-z]" | "abcA", "abc6" |
/ | can never be matched |