You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The option (?i) makes the match case insensitive (identifying A–Z with a–z; no
Unicode support yet). This applies until the end of the group in which it appears,
and can be reverted using (?-i). For instance, in (?i)(a(?-i)b|c)d, the letters a
and d are affected by the i option. Characters within ranges and classes are affected
individually: (?i)[Y-\\] is equivalent to [YZ\[\\yz], and (?i)[^aeiou] matches any
character which is not a vowel. Neither character properties, nor \c{...} nor \u{...}
are affected by the i option.
The concept "character property" is not introduced in the documentation part. In the implementation part, 45.2.4 Character property tests, it says
These character properties are not affected by the (?i) option
Then what's the case of the character properties? There aren't opposite case counterparts of these character classes.
For example, the uppercase-form a string matching \w+\d still matches \w+\d.
I infer from the implementation that the upper-case form of \d means \D, but it is strange to say the case of escaped characters in regex. And this is not consistent, the upper-case form of \c{a} is \c{A}, not \C{A} or \C{a}.
The text was updated successfully, but these errors were encountered:
SainoNamkho
changed the title
[DOC][l3regex] What is the case of the "character properties"?
[DOC][l3regex] The concept "the case of the character properties" is confusing.
Sep 28, 2022
The concept "character property" is not introduced in the
documentation
part. In theimplementation
part,45.2.4 Character property tests, it says
Then what's the case of the character properties? There aren't opposite case counterparts of these character classes.
For example, the uppercase-form a string matching
\w+\d
still matches\w+\d
.I infer from the implementation that the upper-case form of
\d
means\D
, but it is strange to say the case of escaped characters in regex. And this is not consistent, the upper-case form of\c{a}
is\c{A}
, not\C{A}
or\C{a}
.The text was updated successfully, but these errors were encountered: