URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=17264>
Summary: In grep -P patterns \s will match a newline
Project: grep
Submitted by: None
Submitted on: Wednesday 08/02/2006 at 06:33 UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
$ cat foo
foo 1
foo 2
$ grep -P '^\s+foo' foo
foo 2
$ grep -P '^[[:space:]]+foo' foo
foo 2
$ grep '^[[:space:]]+foo' foo
$
In -P mode, ^\s or ^[[:space:]] matches the blank line before 'foo 2'.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=17264>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/