|
Boost : |
From: Martin Bosticky (MBosticky_at_[hidden])
Date: 2002-06-03 18:58:29
Hello everyone.
I am relatively new to the regex library. I am trying to get all strings
matched a a submatch 1, but where submatch 1 can match more than once
because of *. ie
Simplified version: "(?:\s*(\S+)\s+/)*\s+(\S+)"
The problem is that i can't figure out how to force regex using regex_grep
or what ever to give me each match in each sub-expression that occurs. ie.
"xxx / yyy / zzz" will result in match yyy from sub-expression 1 and match
zzz from sub-expression 2. But what about xxx?
The expression i am using is to read filepaths from a config file:
"^TAGFILES\\s+="
"(?:"
"\\s*(\\S+)\\s*\\\\$"
")*"
"(?:"
"\\s*(\\S+)[ \t]*$"
")"
and example file content would be:
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES = D:/OPCrew/Src/TagFiles/Dil.tag \
D:/OPCrew/Src/TagFiles/RunTests.tag \
D:/OPCrew/Src/TagFiles/ScheduleSetServer.tag
GENERATE_TAGFILE =
ALLEXTERNALS = YES
what to do? can this be done in one hit? should i take a different approach?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk