Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-12 Thread Jim Pryor
quot; , Subject: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions Date: Thu, Apr 12, 2012 8:55 pm Some notes: [10010 eitan@radar ~ ]%uname -rms FreeBSD 10.0-CURRENT amd64 [10007 eitan@radar ~ ]%bsdgrep --version bsdgrep (BSD grep) 2.5.1-FreeBSD [10004 eitan@radar ~ ]%printf

Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-12 Thread Eitan Adler
Some notes: [10010 eitan@radar ~ ]%uname -rms FreeBSD 10.0-CURRENT amd64 [10007 eitan@radar ~ ]%bsdgrep --version bsdgrep (BSD grep) 2.5.1-FreeBSD [10004 eitan@radar ~ ]%printf 'abc def' | bsdgrep -o '^[a-z]' a [10006 eitan@radar ~ ]%gnugrep --version gnugrep (GNU grep) 2.5.1-FreeBSD [10005 eitan@

Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-12 Thread Jim Pryor
On Thu, Apr 12, 2012, at 11:37 AM, Jim Pryor wrote: > On Thu, Apr 12, 2012, at 11:14 AM, John D. Hendrickson and Sara Darnell > wrote: > > Your problem is incorrect so there is no sol'n. > > > > printf 'abc def' | grep -o '^[a-z]' > > > > is only supposed to match against abc. > > > > see gr

Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-12 Thread Jim Pryor
On Thu, Apr 12, 2012, at 11:14 AM, John D. Hendrickson and Sara Darnell wrote: > Your problem is incorrect so there is no sol'n. > > printf 'abc def' | grep -o '^[a-z]' > > is only supposed to match against abc. > > see grep(1) about pattern matching - there is plenty of online writeups, >

Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-12 Thread John D. Hendrickson and Sara Darnell
Your problem is incorrect so there is no sol'n. printf 'abc def' | grep -o '^[a-z]' is only supposed to match against abc. see grep(1) about pattern matching - there is plenty of online writeups, esp posix ieee std. see also "ant / antlr" for more about patterns and matching. Jim Pr

Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-11 Thread Jim Pryor
The following reply was made to PR bin/166842; it has been noted by GNATS. From: Jim Pryor 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

Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

2012-04-11 Thread Jim Pryor
The following reply was made to PR bin/166842; it has been noted by GNATS. From: Jim Pryor To: bug-follo...@freebsd.org Cc: Subject: Re: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions Date: Wed, 11 Apr 2012 15:21:01 -0400 I've noticed some more issues wit