Skip to content

Asymmetric behavior for case-insensitive matches #198

@raipc

Description

@raipc

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.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions