|
Boost Users : |
From: Paul Scruby (boost_at_[hidden])
Date: 2003-11-17 06:19:35
Hey Stefan,
You're right my regular expression was not escaped properly! I have put
my code inside some try and catch braces, and everything works fine. BTW,
I have had some problems with exceptions in gcc2.96 (not related to boost)
linking dynamic libraries, but they seem to catch ok with the
-fsjlj-exceptions compiler flag.
Many thanks,
Paul
> Hi Paul
>
> I tried your example on VC++. It does not crash but throws
> boost::bad_expression with message: "Unmatched \{". I think that you
> should
> modify your pattern to "(value|default)[^}]*\\{". Otherwise the backslash
> is ignored (VC++ gives a warning about that) and regex treats '{' as the
> start of the bounds operator "{}" - as result a closing '}' is expected.
>
> Stefan
>
> ----- Original Message -----
> From: "Paul Scruby" <boost_at_[hidden]>
> To: <boost-users_at_[hidden]>
> Sent: Sunday, November 16, 2003 8:37 PM
> Subject: [Boost-users] regex problems
>
>
>> The boost::regex class is crashing when I construct it with some regular
>> expressions. For example: "(value|default)[^}]*\{" will crash and
>> "value|default" does not.
>>
>> Is this a bug, or am I doing something wrong? I am running gcc2.96 and
>> boost1.30.2. I have attached an example src including Makefile.
>>
>> Thanks in advance,
>>
>> Paul
>>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net