[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #32412] Error parsing a pattern including "( ??? |+)"
From: |
Andre Sencioles Vitorio Oliveira |
Subject: |
[bug #32412] Error parsing a pattern including "( ??? |+)" |
Date: |
Thu, 10 Feb 2011 11:18:12 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 |
URL:
<http://savannah.gnu.org/bugs/?32412>
Summary: Error parsing a pattern including "( ??? |+)"
Project: grep
Submitted by: asenci
Submitted on: Thu 10 Feb 2011 11:18:11 AM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Trying to run grep with Extended Regex and a pattern including "( ??? |+)"
causes a parsing error on version 2.6.3. The issue couldn't be reproduced in
version 2.5.1.
It seams the plus is qualifying the pipe, so it's trying to match a string
with one or more pipes (|, ||, |||, ...).
$ grep -V
GNU grep 2.6.3
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ echo "-RA" | grep -Eq '^(-|+)RA$' && echo OK
grep: Unmatched ) or \)
$ echo "-RA" | grep -Eq '^(+|-)RA$' && echo OK
OK
$ echo "-RA" | grep -Eq '^(-|\+)RA$' && echo OK
OK
$ grep -V
grep (GNU grep) 2.5.1
Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ echo "-RA" | grep -Eq '^(-|+)RA$' && echo OK
OK
$ echo "-RA" | grep -Eq '^(+|-)RA$' && echo OK
OK
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32412>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #32412] Error parsing a pattern including "( ??? |+)",
Andre Sencioles Vitorio Oliveira <=