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]

regcomp() and regex pattern help


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+)"

...which almost works, but also captures "Power" and "states" which I
don't want. Can anyone help? https://www.regex101.com/r/cE2mN0/1

-- 
Kip Warner -- Senior Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

Attachment: signature.asc
Description: This is a digitally signed message part


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