|
|||||
Character sets and case insensitivity | |||||
Prerequisite Concepts |
Preceding the character set with a ul
keyword causes the pattern to match the characters in the set, as well as any lowercase and uppercase mappings the specified characters have. For example,
find ul ["abc" except "B"]...
matches the letters "a", "A", "c", and "C", but not "b" or "B".
The lowercase and uppercase mappings of characters can be changed with the declare data-letters
declaration.
Note that ul lc
is usually, but not always, equivalent to letter
. They are different when there is a declare data-letters
declaration which re-maps an existing lowercase letter onto a new uppercase character. This leaves the old uppercase letter without a corresponding lowercase letter, even though it is still a member of the letter
character class.
An example of such an exceptional declare data-letters
declaration is the following:
declare data-letters "a" "1"
In this case, the declaration changes the uppercase version of "a" to "1", so that there is no lowercase letter that has the uppercase letter "A". Needless to say, such declarations are deprecated.
Prerequisite Concepts Character classes Pattern matching |
---- |