Let's leave the actual case, but take the example of having input which has different combinations for each caracter. One can make strings for each of this case, but this explodes of course the number of combinations. So suppose I still have a string like a[a,b][a,c] representing all cases of this string. Now suppose regex_match is going to match this with (a|b)*. I can imagine that it in the end it will call something like if (*it == 'a'). This is the equality operator called for the type the iterator is pointing to. thus e.g. struct multiple_string { typedef std::string char_type; std::vectorstd::string m_Data; }; bool operator==(char_type k1, multiple_string::char_type k2) { //etc... } Now the whole question was, how do I hget something like this compilable with boost regex. I see that it has overloads for icu and MFC string, but these always seems to be character based. Put it in another way, is boost regex biased towards string types, or supports it a generic interface. Wkr, me