On Sat, 24 May 2008 17:57:45 +0200
Alan McKinnon <[EMAIL PROTECTED]> wrote:
> On Saturday 24 May 2008, Robin Atwood wrote:
> > But why does "[[:space:]]+" work and "\s+" fail?
>
> Apparently because \s is not a synonym for [[:space:]]
As Robin's already pointed out, \s is part of Perl's regex syntax. If
you've compiled grep with the pcre useflag, you can use grep -P
> I've heard this one before but never got it to work and never seen it
> in writing. Do you have a reference for where you read it?
If you've emerged libpcre, then man pcrepattern has all the gory
details.
A lot of regular expressions floating around the interweb use pcre
syntax, because libpcre has been ported to Windows. E.g., several
Windows newsreaders use it for scoring.
--
»Q«
Kleeneness is next to Gödelness.
--
[email protected] mailing list