Skip to content

expr: '^' should act as a special character at the start of a subexpression #7952

@frendsick

Description

@frendsick

^ acts as a special character only at the beginning of the regular expression or subexpression (that is, after ( or |).

Reference: https://www.gnu.org/software/sed/manual/html_node/BRE-syntax.html

Examples

  • expr b : 'a\|^b'
    • Expected: "1"
    • Got: "0"
  • expr ab : '\(^a\)b'
    • Expected: "a"
    • Got: ""

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