
17 Oct
2008
17 Oct
'08
5:04 p.m.
AMDG Robert Dailey wrote:
I noticed that there are no examples for using regex_finder with find_iterator. I checked the test & example directories in libs, and also the documentation. I found nothing useful. Could someone provide a quick example? So far here is what I have, but it does not compile:
It compiles for me with the trunk, but crashes at runtime.
boost::find_iterator<std::string::iterator> keyIt( queryKey, boost::regex_finder( boost::regex( "/.*?" ) ) );
Don't pass a temporary regex to regex_finder. The find_iterator ends up holding a reference to a destroyed regex. In Christ, Steven Watanabe