Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Apr 2012 00:43:29 GMT
From:      Jim Pryor <dubiousjim@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/166862: grep [[:alnum:]]* only matches once
Message-ID:  <201204120043.q3C0hTex048478@red.freebsd.org>
Resent-Message-ID: <201204120050.q3C0oDe2084962@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166862
>Category:       bin
>Synopsis:       grep [[:alnum:]]* only matches once
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 12 00:50:13 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jim Pryor
>Release:        9.0-PRELEASE
>Organization:
>Environment:
FreeBSD vaio.jimpryor.net 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0: Tue Nov 29 02:45:33 EST 2011 root@vaio.jimpryor.net:/usr/obj/usr/src/sys/MINE amd64
>Description:
This behaves as expected:
$ printf '_abc d_ef 1ghi' | grep -o '[[:alnum:]_]\+'
_abc
d_ef
1ghi

But this gives only a single match:
 8:36 PM vaio pts8 .../arch/usr/share/man $ printf '_abc d_ef 1ghi' | grep -o '[[:alnum:]_]*'
_abc

Same results if we use egrep instead, or use "\w" instead of "[[:alnum:]_]".

grep version line:
/* $FreeBSD: src/usr.bin/grep/grep.c,v 1.11.2.3 2011/10/20 16:08:11 gabor Exp $

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204120043.q3C0hTex048478>