The following reply was made to PR bin/166842; it has been noted by GNATS.

From: Jim Pryor <dubious...@gmail.com>
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring
 positions
Date: Thu, 12 Apr 2012 00:00:46 -0400

 On Wed, Apr 11, 2012, at 03:21 PM, Jim Pryor wrote:
 > I've noticed some more issues with the same version of grep. I don't
 > know whether they're related, but I'll append them here for now.
 > 
 > $ printf abc | grep -o '^[a-c]'
 
 Some more observations that seem related:
 
 $ printf 'abc def' | grep -o '^[a-z]'
 
 will match against each of the letters in 'abc', but not against any of
 the letters in 'def'.
 
 On the other hand:
 
 $ printf 'abc def' | grep -o '\b[a-z]'
 $ printf 'abc def' | grep -o '\<[a-z]'
 
 will each match against all six of the letters.
 
 Matching against the patterns:
   '[a-z]\b'
   '[a-z]\>'
   '[a-z]$'
 gives correct results.
 -- 
 dubious...@gmail.com
 
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to