Is it safe to declare a static/global variable with a fixed boost::wregex and then use it from multiple threads without worrying about the regex’s internal state (if Boost has been compiled with BOOST_HAS_THREADS)?
e.g.
boost::wregex g_regex( L"common|test" );
then have multiple threads calling:
if ( boost::regex_search( test_str, g_regex ) )
...
http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/background_information/thread_safety.html