Can I make a regex array to iterate through in C++?
Probably like this:

C++11:

vector&lt; pair&lt;regex, string&gt; &gt; regex_pairs = { {regex(".."), "($1/$2)"}, {regex(".."), "($1)"}, {regex(".."), "($2)"} };
for(auto pa:regex_pairs){
    cout &lt;&lt; regex_replace(string, pa.first, pa.second);
}


C++03:

vector&lt; pair&lt;regex, string&gt; &gt; regex_pairs;
regex_pairs.push_back(make_pair(regex(".."), "($1/$2)"));
regex_pairs.push_back(make_pair(regex(".."), "($1)"));
regex_pairs.push_back(make_pair(regex(".."), "($2)"));
for(vector&lt; pair&lt;regex, string&gt; &gt;::iterator it = regex_pairs.begin();it!=regex_pairs.end(); it++){
    cout &lt;&lt; regex_replace(string, it-&gt;first, it-&gt;second);
}