This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: regcomp() and regex pattern help
- From: Florian Weimer <fweimer at redhat dot com>
- To: Kip Warner <kip at thevertigo dot com>, libc-help at sourceware dot org
- Date: Tue, 17 Mar 2015 12:55:41 +0100
- Subject: Re: regcomp() and regex pattern help
- Authentication-results: sourceware.org; auth=none
- References: <1422665548 dot 4531 dot 31 dot camel at thevertigo dot com>
On 01/31/2015 01:52 AM, Kip Warner wrote:
> Hey list,
>
> I am trying to tokenize (capture) all of the tokens after the...
>
> " Power states:"
>
> ...in the string...
>
> " Power states: D1 D0 Something"
>
> ...with regcomp() to capture D1, D0, Something, etc.. I am
> using...
>
> "^\s{2}Power states:\s{2}|(\w+)"
Try "\^s{2}Power states:((\s\w+)+)".
--
Florian Weimer / Red Hat Product Security