Skip to content

expr: fails to match string to regular expression with escaped parens and braces #7664

@jfinkels

Description

@jfinkels

Environment: Ubuntu 24.04, uutils main branch (git commit 3971bb3), GNU coreutils v9.6.38-2b088-modified

Steps to reproduce:

expr "{1}a" : "\(\{1\}a\)"

What happens now: uutils expr outputs the empty string and terminates with exit status 1.

What I expected to happen: GNU expr outputs {1}a and terminates with exit status 0.

Notes: this is causing a failure in GNU test file tests/expr/expr.pl (in test case bre17).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions