On Wed, Dec 12, 2007 at 10:52:25AM -0000, [EMAIL PROTECTED] wrote: > URL: > http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/GuiCitation.cpp?rev=22098 > ============================================================================== > --- lyx-devel/trunk/src/frontends/qt4/GuiCitation.cpp (original) > +++ lyx-devel/trunk/src/frontends/qt4/GuiCitation.cpp Wed Dec 12 11:52:23 2007 > @@ -691,8 +691,16 @@ > // it is treated as a simple string by boost::regex. > expr = escape_special_chars(expr); > > - boost::regex reg_exp(to_utf8(expr), case_sensitive ? > - boost::regex_constants::normal : boost::regex_constants::icase); > + boost::regex reg_exp; > + try { > + reg_exp.assign(to_utf8(expr), case_sensitive ? > + boost::regex_constants::normal : > boost::regex_constants::icase); > + } catch (boost::regex_error & e) { > + // boost::regex throws an exception if the regular expression > is not > + // valid.
"Nice." Andre'