[Top][All Lists]

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

bug#17799: grep 2.5.4 ignoring parts of expression

From: Norihiro Tanaka
Subject: bug#17799: grep 2.5.4 ignoring parts of expression
Date: Thu, 19 Jun 2014 00:36:41 +0900

If you don't specify any options, grep regards a pattern as BRE.


(', `)' and `?' are treated as normal character in BRE.  If you expect
that they are treated as special character, you must escape them with

BTW, I see you want to use ERE.


If so, you must specify -E option.  I test below on Fedora 20.

$ cd /usr/include/c++/4.8.2
$ grep -E "#include <(bits/)?random(\.h)?>" * 2>/dev/null
$ grep "#include <(bits/)?random(\.h)?>" * 2>/dev/null
random:#include <bits/random.h>

reply via email to

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