Skip to content

regex negated regex character class excludes unrelated non-ASCII characters #5607

Closed

Description

@robertmorelli

issue:
[^ſ] should match any single character except ſ (U+017F). Racket correctly excludes ſ, but also excludes unrelated characters such as ß and é.

repro:

(regexp-match? #px"^[^ſ]$" "ſ") ; #f
(regexp-match? #px"^[^ſ]$" "a") ; #t
(regexp-match? #px"^[^ſ]$" "ß") ; #f (should be #t)
(regexp-match? #px"^[^ſ]$" "é") ; #f (should be #t)

expected:
The last two expressions should return #t: neither ß nor é is ſ.

system:
Racket v9.3 [cs]
macOS 27.0 (build 26A428), arm64

Activity

  1. added a commit that references this issue on Oct 14, 2026
    8f66be5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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