|
Boost : |
From: Steven Burns (royalstream_at_[hidden])
Date: 2006-07-25 11:06:21
> Ouch, of course. Perhaps I should not be trying getting a grip at
> boost::regex at this time.
Personally, I found boost.regex relatively easy to use.
If you do need it, don't give up. This library is doing wonders for me.
Steven
"Torsten Landschoff" <torsten_at_[hidden]> wrote in message
news:20060724223800.GA26806_at_stargate.galaxy...
> Hi Eric,
>
> On Mon, Jul 24, 2006 at 03:29:40PM -0700, Eric Niebler wrote:
>> Torsten Landschoff wrote:
>> >
>> > boost::smatch sm;
>> > BOOST_REGEX_TEST(boost::regex_match(std::string(text), sm, re));
>>
>> Here is your problem. You're performing a match on a temporary
>> std::string. After regex_match returns, sm will be left holding
>> iterators into a destroyed string. Try:
>
> Ouch, of course. Perhaps I should not be trying getting a grip at
> boost::regex at this time. Thanks, I'll have to check if I produced the
> same bug at work. I think I am not as the string is a member over there,
> but I have to check.
>
> Thanks again and good night,
>
> Torsten
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk