Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2002-11-07 06:44:00

> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at