Subject: [Boost-users] Boost.Regex: Iterate over named captures/groups
From: NoRulez (norulez_at_[hidden])
Date: 2012-01-30 11:33:37


Hi @all,

if I have a regex (e.g.: "^Subject: (Re: |Fw: )*(?<subject>.*)")

I know I can access them with what["subject"] but is there a way to get a list or whatever of named captures/groups?

Maybe something like the following:
foreach(const std::string &str, what.namedGroups()) {
    std::cout << "Group Name: " << what[str] << std::endl;
}

Thanks in advance

Best Regards
NoRulez