Skip to content

regex /iv nested character class matches an excluded character #5573

Closed as not planned

Description

@robertmorelli

Describe the bug
The regex pattern /^[s[^a]]$/iv matches "a", although "a" is excluded by the nested character class.

To Reproduce

console.log(/^[s[^a]]$/iv.test("a")); // prints true

Expected behavior
prints false

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)

Activity

  1. Tushar15769 commented on Oct 15, 2026

    @Tushar15769

    I tracked this down to the regress crate, where case folding was happening after the character-set operations. I've opened [PR #208](ridiculousfish/regress#208) with a fix and some regression tests. I'll update this issue once the PR is reviewed and the fix can be integrated into Boa.

  2. jedel1043 commented on Oct 16, 2026

    @jedel1043
    Member

    Since this is a regress issue, closing as not planned here.

  3. Tushar15769 commented on Oct 16, 2026

    @Tushar15769

    Thanks for the clarification @jedel1043 . I understand that this should be handled in the consuming project. Since the original issue was reported in Boa, would you recommend submitting the fix there instead, or is there a separate upstream issue in regress that should track this behavior?

  4. jedel1043 commented on Oct 16, 2026

    @jedel1043
    Member

    Yeah you should report this issue to the Regress repo

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions