Skip to content

regex character class fails to match an escaped high surrogate #5569

Closed as not planned

Description

@robertmorelli

Describe the bug
the regex pattern /^[\uD83D\uDE00]$/ fails to match "\ud83d"

To Reproduce

console.log(/^[\uD83D\uDE00]$/.test("\ud83d")); // prints false

Expected behavior
prints true

Build environment:

  • OS: macOS
  • Version: 27.0 (build 26A428)
  • Target triple: aarch64-apple-darwin
  • Rustc version: rustc 1.99.0 (b940084d7 2026-09-28) (Homebrew)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions