#include <string>
#include <iostream>
#include <regex>
using namespace std;

int main() {
	std::regex r("(a)|(b)|(c)");
	std::string s = "abcab";
	for(std::sregex_iterator i = std::sregex_iterator(s.begin(), s.end(), r);
                             i != std::sregex_iterator();
                             ++i)
    {
        std::smatch m = *i;
        std::cout << "    Capture: " << m.str() << " at Position " << m.position() << '\n';
    }
	return 0;
}
