Bug 194397 - Base GNU grep does not handle \s in extended regex
Summary: Base GNU grep does not handle \s in extended regex
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: gnu (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-16 01:28 UTC by Ed Maste
Modified: 2019-08-12 18:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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