POSIX Regex [:alpha:] 字符 class 的精确定义是什么?
Which is the precise definition of the POSIX Regex [:alpha:] character class?
我不清楚 POSIX [:alpha:]
Regex 字符 class 在所有语言环境或字符集中是否严格等同于 Regex 表达式 [a-zA-Z]
,或者如果如果所讨论的语言环境或字符集允许重音字符,它还包括重音字符。
http://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap09.html 的规范只提到它应该被所有语言环境支持,但没有提到它包含的内容。
有没有权威的地方对[:alpha:]
字符class的确切含义有明确的定义?
In the POSIX locale, a range expression represents the set of
collating elements that fall between two elements in the collation
sequence, inclusive. In other locales, a range expression has
unspecified behavior: strictly conforming applications shall not rely
on whether the range expression is valid, or on the set of collating
elements matched.
(强调已添加。)
所以,在 POSIX 语言环境之外,[a-zA-Z]
,严格来说,甚至不是
定义。 (当然,由于这些都是 ASCII 字符,实际上
我希望它在任何地方都意味着同样的事情;但考虑
EBCDIC,其中这些字符甚至不连续。所以可以
例外。)
[:alpha:]
的确切含义取决于语言环境,并且有很多,
许多语言环境,由各种实体定义。我当然不会
关于 [:alpha:]
包含或不包含任何内容的任何假设
POSIX.
以外的语言环境
我不清楚 POSIX [:alpha:]
Regex 字符 class 在所有语言环境或字符集中是否严格等同于 Regex 表达式 [a-zA-Z]
,或者如果如果所讨论的语言环境或字符集允许重音字符,它还包括重音字符。
http://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap09.html 的规范只提到它应该被所有语言环境支持,但没有提到它包含的内容。
有没有权威的地方对[:alpha:]
字符class的确切含义有明确的定义?
In the POSIX locale, a range expression represents the set of collating elements that fall between two elements in the collation sequence, inclusive. In other locales, a range expression has unspecified behavior: strictly conforming applications shall not rely on whether the range expression is valid, or on the set of collating elements matched.
(强调已添加。)
所以,在 POSIX 语言环境之外,[a-zA-Z]
,严格来说,甚至不是
定义。 (当然,由于这些都是 ASCII 字符,实际上
我希望它在任何地方都意味着同样的事情;但考虑
EBCDIC,其中这些字符甚至不连续。所以可以
例外。)
[:alpha:]
的确切含义取决于语言环境,并且有很多,
许多语言环境,由各种实体定义。我当然不会
关于 [:alpha:]
包含或不包含任何内容的任何假设
POSIX.