[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #30515] Grep now seems to interpret \s in the regex as whitespace
From: |
Gene Hightower |
Subject: |
[bug #30515] Grep now seems to interpret \s in the regex as whitespace |
Date: |
Thu, 22 Jul 2010 00:05:41 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4 |
URL:
<http://savannah.gnu.org/bugs/?30515>
Summary: Grep now seems to interpret \s in the regex as
whitespace
Project: grep
Submitted by: Digilicious
Submitted on: Wed 21 Jul 2010 05:05:40 PM PDT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Grep now seems to interpret \s in the regex as whitespace. This is
not how grep used to work, nor is it how grep is documented to work.
Old grep works fine:
$ grep --version
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 s | grep -c '^\s$'
1
$ echo " " | grep -c '^\s$'
0
New grep is broken:
$ grep --version
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 s | grep -c '^\s$'
0
$ echo " " | grep -c '^\s$'
1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30515>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #30515] Grep now seems to interpret \s in the regex as whitespace,
Gene Hightower <=