Skip to content

# parsed incorrectly in qr/\Q...\E/x #18981

@choroba

Description

@choroba

Where
perlre

Description
The documentation currently states:

Use of /x means that if you want real whitespace or "#" characters in the pattern (outside a bracketed character class, which is unaffected by /x), then you'll either have to escape them (using backslashes or \Q...\E) o

But in reality, \Q...\E doesn't help:

"a" =~ /( \Q # abc \E) /x;

leads to

Unmatched ( in regex; marked by <-- HERE in m/(  <-- HERE \ \#\ abc\ \\E\)\ / 

The documentation should be fixed, unless it's a bug in the implementation (I'm not sure).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions