Asymmetric behavior for case-insensitive matches
Open
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
Case-insensitive matching with Unicode category `\p{Ll}` (lowercase letters) does not include uppercase equivalents.
```
// (?i)\p{Lu} correctly matches both cases:
RE2.compile("(?i)\\p{Lu}").matches("A") // true
RE2.compile("(?i)\\p{Lu}").matches("a") // true
// (?i)\p{Ll} only matches lowercase — the (?i) flag has no effect:
RE2.compile("(?i)\\p{Ll}").matches("a") // true
RE2.compile("(?i)\\p{Ll}").matches("A") // false — expected true
```
The same applies to `\p{Lt}` (titlecase) which is missing uppercase equivalents. Affects all scripts (Latin, Cyrillic, Greek, Armenian, etc.).
Contributor guide
Assessment
This issue has not been assessed yet.