1 |
On Sat, 24 May 2008 17:57:45 +0200 |
2 |
Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
3 |
|
4 |
> On Saturday 24 May 2008, Robin Atwood wrote: |
5 |
> > But why does "[[:space:]]+" work and "\s+" fail? |
6 |
> |
7 |
> Apparently because \s is not a synonym for [[:space:]] |
8 |
|
9 |
As Robin's already pointed out, \s is part of Perl's regex syntax. If |
10 |
you've compiled grep with the pcre useflag, you can use grep -P |
11 |
|
12 |
> I've heard this one before but never got it to work and never seen it |
13 |
> in writing. Do you have a reference for where you read it? |
14 |
|
15 |
If you've emerged libpcre, then man pcrepattern has all the gory |
16 |
details. |
17 |
|
18 |
A lot of regular expressions floating around the interweb use pcre |
19 |
syntax, because libpcre has been ported to Windows. E.g., several |
20 |
Windows newsreaders use it for scoring. |
21 |
|
22 |
-- |
23 |
»Q« |
24 |
Kleeneness is next to Gödelness. |
25 |
|
26 |
|
27 |
-- |
28 |
gentoo-user@l.g.o mailing list |