regcomp() and regex pattern help

Kip Warner kip@thevertigo.com
Sat Jan 31 00:52:00 GMT 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://sourceware.org/pipermail/libc-help/attachments/20150131/fabbecc8/attachment.sig>


More information about the Libc-help mailing list