Skip to content

benchmarks/correctness.js: regex [\\d] matches literal backslash/d not digit #365

Description

@nanaubusiness

In benchmarks/correctness.js line 207:

if re.search(r'(?<![\\d])351(?:\\.0)?(?![\\d])', output):

In a Python raw string, [\\d] is the character class containing a literal backslash and the letter 'd', NOT the digit shorthand \d. The intent was (?<!\d) / (?!\d) (not preceded/followed by a digit), but the double-backslash makes it check for backslash or 'd' instead.

This would cause the correctness gate to mis-evaluate test cases involving the number 351.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions