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

int main() {
	regex re("'([^']+)'");
	std::string s = "arg1('FooBar') arg2('Another Value')";

    sregex_token_iterator i(s.begin(), s.end(), re, {1});
    sregex_token_iterator j;

    unsigned count = 0;
    while(i != j)
    {
        cout << "the token is"<<"   "<<*i++<< endl;
        count++;
    }
    cout << "There were " << count << " tokens found." << endl;

	return 0;
}