> We are having some problems with using boost.regex without exceptions.
>
> If a faulty regex is entered the app usually crashes with a SIGFPE
> signal.
>
> Is it any way to check that a regex is valid?
> (when not using exceptions)
>
> boost::regex e("a(");
>
> works fine... but when used app crashes.

It's not actually documented, but use the set_expression member function and
check to see if the return value is zero (expression compiled OK), or not.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to