From nobody@FreeBSD.org  Thu Apr 12 00:43:29 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A047D106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Apr 2012 00:43:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A90D8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Apr 2012 00:43:29 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q3C0hTOL048484
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Apr 2012 00:43:29 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q3C0hTex048478;
	Thu, 12 Apr 2012 00:43:29 GMT
	(envelope-from nobody)
Message-Id: <201204120043.q3C0hTex048478@red.freebsd.org>
Date: Thu, 12 Apr 2012 00:43:29 GMT
From: Jim Pryor <dubiousjim@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: grep [[:alnum:]]* only matches once
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         166862
>Category:       bin
>Synopsis:       grep(1): 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:  Thu Apr 12 00:59:59 UTC 2012
>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:
