|
Boost Users : |
From: Renjie Zhao (bugreport_at_[hidden])
Date: 2006-06-13 02:47:23
Can any one tell me how to specify "Multiline" search while using regex?
e.g.
std::string fb;
// fb stores a fragment of html code, multiline;
boost::regex
pattern("</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>");
boost::smatch res;
boost::match_flag_type flags = boost::match_default;
std::string::const_iterator s , e;
s = fb.begin();
e = fb.end();
if(boost::regex_search(s, e, res, pattern, flags))
{
//process the match.
}
else
{
//I am always here
}
When I use some other regex tools to check the same target string and match
pattern string, I always get the right thing as expected.
How can I alter the option of boost::regex_search to satisfy the original
request?
thanks
-- This is my Very Signature. Ha, pretty good?
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