I am trying to parse a certificate in c++ and decided it was a good opportunity to learn Regex. I just learned about regex an hour or so ago, so excuse my lack of knowledge.
I am looking for all of the OU's associated with an entry.
I am doing the following:
std::smatch OuMatches;
std::string myCertSubject = "O=\"My Company, Incorporated\", OU=Technician Level - A3, OU=Access Level - 1, CN=\"Name, My\", E=namem@company.com";
std::regex subjectRx("OU=[[:w:]|[:s:]|[:digit:]|-]*", std::regex_constants::icase);
bool foundOU = std::regex_search(mySubject,OuMatches,subjectRx);
Why won't this give me all of the results (2) that match my reg ex? Is there a way to get this?