
22 Mar
2011
22 Mar
'11
10:29 a.m.
Using Boost Regex for the first time I note that if there is an error in the syntax of the RE given then an exception is raised.
Is this the only way of checking the RE syntax ? Or is there a function that I can call which can validate it for me without an exception. I don't see anything in the documentation (I'm using Boost 1.4 as I need to use it with Visual C++ 6).
boost::regex e(some_string, boost::regex_constants::no_except); if(e.status) { // Ooops we have an error.... } HTH, John.