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/