$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Eric Niebler (eric_at_[hidden])
Date: 2006-07-24 18:29:40
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:
std::string str(text);
BOOST_REGEX_TEST(boost::regex_match(str, sm, re));
instead.
-- Eric Niebler Boost Consulting www.boost-consulting.com