Bug 194397

Summary: Base GNU grep does not handle \s in extended regex
Product: Base System Reporter: Ed Maste <emaste>
Component: gnuAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Some People CC: kevans
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Ed Maste freebsd_committer 2014-10-16 01:28:07 UTC
\s should match whitespace but does not:

FreeBSD 11.0-CURRENT from Sep. 21

joule% echo 'a b' | /usr/bin/grep -E '^a\sb'
joule%
joule% /usr/bin/grep --version
grep (GNU grep) 2.5.1-FreeBSD

GNU grep package works:

joule% echo 'a b' | /usr/local/bin/grep -E '^a\sb'
a b
joule% /usr/local/bin/grep --version              
/usr/local/bin/grep (GNU grep) 2.20

BSD grep works:

echo 'a b' | /usr/bin/bsdgrep -E '^a\sb'

joule% /usr/bin/bsdgrep --version
bsdgrep (BSD grep) 2.5.1-FreeBSD

BSD grep and base GNU grep both link against /usr/lib/libgnuregex.so.5