Hello Boost Users!
I'm seeking some help from the community because can't see answer in
documentation or in source code.
I need to find which regex of N my string matches. I don't like to compare
them one by one, to speed up the process.
It's easy to implement if I have them compile time:
```cpp
sregex re = (s1 = re1)|(s2 = re2)|(s3=re3);
...
std::set<int> foo(const std::string& str) {
std::set<int> result;
smatch match;
if(regex_match(str, match, re)) {
for(int i = 0; i<3; ++i)
if(match[i+1]) result.insert(i);
}
return result;
}
```
But I have a vector:
```cpp
std::set<int> foo(const std::string& str, const std::vector<sregex>&
reVector) {
sregex re;
int index = 1;
for(auto&& item : reVector) {
re |= (mark_tag(index++) = item); // (1)
}
std::set<int> result;
smatch match;
if(regex_match(str, match, re)) {
for(int i = 0; i