Skip to content

Allow regexes to support \Q (and friends) #323

@rkleemann

Description

@rkleemann

I've run into an issue where I could use \Q support, but when trying to use it I get the follow error:

$ ack '\s+\Q'"$MYVAR"'\E\s+'
ack: Invalid regex '\s+\QFoo!\E\s+'
Regex: \s+\QFoo!\E\s+
           ^---HERE Unrecognized escape \Q passed through in regex

In this situation, -Q will not work, as I need some regex around $MYVAR to get exactly what I'm looking for.

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