Skip to content

regex counted repetition misses a valid match #5574

Closed as not planned
Closed as not planned

Description

@robertmorelli

Describe the bug
The regex pattern /(?:(?:a+)+){2}/ fails to match "aa".

To Reproduce

console.log(/(?:(?:a+)+){2}/.test("aa")); // 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)

Activity

  1. Tushar15769 commented on Oct 14, 2026

    @Tushar15769

    Hi! I'd like to work on this issue and investigate the counted-repetition matching bug. I plan to reproduce the reported behavior, identify the root cause, and add regression tests along with the fix.
    Thank you!

  2. mansiverma897993 commented on Oct 15, 2026

    @mansiverma897993
    Contributor

    @robertmorelli @jedel1043 I have raised #5585 can anyone take a look on it and let me know further changes !!

  3. jedel1043 commented on Oct 16, 2026

    @jedel1043
    Member

    Since this is a regress issue, we can close it here as not planned.

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