bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #14946] "grep -P" doesn't support pattern lists


From: Julian Foad
Subject: Re: [bug #14946] "grep -P" doesn't support pattern lists
Date: Thu, 10 Nov 2005 15:26:38 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

Charles Levert wrote:

Would replacing each newline character in the aggregated pattern by a
vertical line character do the trick?  Just as the tricks that are used to
support -w and -x, this can be abused by a user who intentionally feeds in an
invalid pattern or pattern list (e.g., "echo 'x y z' | grep -P -w --color 'x)
y (z'").

I imagine that would work iff "|" is the lowest-precedence operator supported by Perl regexps (and means alternation as in EREs). I don't know anything about them.

I don't understand what your example command demonstrates.

- Julian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]