This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: regcomp() and regex pattern help


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]