Gentoo Archives: gentoo-user

From: "»Q«" <boxcars@×××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Need help with a regex
Date: Sun, 25 May 2008 03:05:20
Message-Id: 20080524215801.5a34cda3@bellgrove.remarqs.net
In Reply to: Re: [gentoo-user] Need help with a regex by Alan McKinnon
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

Replies

Subject Author
Re: [gentoo-user] Re: Need help with a regex Robin Atwood <robin.atwood@×××××××××.net>