- 论坛徽章:
- 0
|
刚好正在看gawk,复制下来相关原文吧.
Collating symbols
Multicharacter collating elements enclosed between ‘[.’ and ‘.]’. For example,
if ‘ch’ is a collating element, then [[.ch.]] is a regexp that matches this
collating element, whereas [ch] is a regexp that matches either ‘c’ or ‘h’.
Equivalence classes
Locale-specific names for a list of characters that are equal. The name is enclosed
between ‘[=’ and ‘=]’. For example, the name ‘e’ might be used to represent
all of “e,” “`e,” and “′e.” In this case, [[=e=]] is a regexp that matches
any of ‘e’, ‘′e’, or ‘`e’.
These features are very valuable in non-English-speaking locales.
Caution: The library functions that gawk uses for regular expression matching currently
recognize only POSIX character classes; they do not recognize collating symbols or equivalence
classes. |
|