Subject: Re: strange regex \W and manual bug
To: Caffeinate The World <mochaexpress@yahoo.com>
From: Paul Goyette <paul@whooppee.com>
List: current-users
Date: 04/22/2003 10:38:36
From POSIX 1003.2/D11.2, Section 2.8.3.2 (1):
... The special characters
. * [ \
(period, asterisk, left-bracket, and backslash, respectively)
shall lose their special meaning within a bracket expression.
...
And as far as I can tell, \w and \W aren't mentioned at all in 1003.2
On Tue, 22 Apr 2003, Caffeinate The World wrote:
>
> --- Martin Husemann <martin@duskware.de> wrote:
> > On Tue, Apr 22, 2003 at 03:02:45AM -0700, Caffeinate The World wrote:
> > > # egrep [\W] -
> >
> > try
> >
> > egrep '[\W]' -
>
> That didn't work either, but the following worked:
>
> ---
> # egrep '\W' -
> !
> !
> a
> 2
>
> .
> .
> _
> -
> -
> ---
>
> I guess you can't put use square brackets around \W. Is that POSIX?
>
> Thomas T. Thai
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
>
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | 9DC5 05CF 1AE7 DC42 CCC6 | paul@whooppee.com |
| & World Cruiser | 6858 051E 7AD2 A6B2 4954 | pgoyette@juniper.net |
----------------------------------------------------------------------