Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC][l3regex] The concept "the case of the character properties" is confusing. #1134

Closed
SainoNamkho opened this issue Sep 28, 2022 · 0 comments
Labels
documentation Issues in the documenation l3regex

Comments

@SainoNamkho
Copy link
Contributor

SainoNamkho commented Sep 28, 2022

The option (?i) makes the match case insensitive (identifying AZ with az; 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}.

@SainoNamkho 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
@blefloch blefloch added documentation Issues in the documenation l3regex labels Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues in the documenation l3regex
Projects
None yet
Development

No branches or pull requests

2 participants