I\'m an Android developer and recently came across the GLOB clause in SQLite. I cannot understand why we need GLOB given that LIKE is already in place.
Both clauses
Case sensitivity is useful by itself, because this works better with normal indexes.
Additionally, GLOB supports character classes:
Globbing rules:
*
Matches any sequence of zero or more characters.
?
Matches exactly one character.
[...]
Matches one character from the enclosed list of characters.
[^...]
Matches one character not in the enclosed list.With the
[...]
and[^...]
matching, a]
character can be included in the list by making it the first character after[
or^
. A range of characters can be specified using-
. Example:[a-z]
matches any single lower-case letter. To match a-
, make it the last character in the list.