Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail From: Bob Proulx Newsgroups: gnu.utils.bug Subject: Re: Bug of grep -E Date: Wed, 6 Dec 2017 11:31:52 -0700 Lines: 17 Approved: bug-gnu-utils@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1512585121 24293 208.118.235.17 (6 Dec 2017 18:32:01 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-gnu-utils To: iPack <2741547153@qq.com> Envelope-to: bug-gnu-utils@gnu.org Mail-Followup-To: iPack <2741547153@qq.com>, bug-gnu-utils Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 96.88.95.61 X-BeenThere: bug-gnu-utils@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU utilities List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.utils.bug:2226 iPack wrote: > [urain39@urain39-pc ~]$ cat test | grep -Eo '[0-9a-f]{32}/[0-9A-Za-z\-%_\.]+' > a4ff5caad2fa35faa2271df9badacd35/Konachan.com%20 > > It is bug ? or just my syntax error ? Recent versions of grep (at least on my Debian system) report this as an invalid expression for the reasons already noted by others. Here using your verbatim pattern (with the invalid \- \. escaping): $ grep -Eo '[0-9a-f]{32}/[0-9A-Za-z\-%_\.]+' /dev/null grep: Invalid range end Updating would add this improved validation reporting capability. :-) Bob