Hi I'm trying to convert this perl-style regular expression used in PHP to C++:

Everything I've tried in C++ fails on this HTML:

<div> <input type="hidden" name="varName"
value="varValue" /> </div>
The key in PHP seems to be the s modifier, which apparently means "Dot all (s)" but I fail to find any equivalent boost::regex_constants flag.

In C++ I'm using:

boost::match_results<std::string::const_iterator> what;
boost::match_flag_type flags = boost::regex_constants::match_perl | boost::regex_constants::format_perl;

if(boost::regex_search((std::string::const_iterator)html.begin(), (std::string::const_iterator)html.end(), what, boost::regex("name=\"varName\".+value=\"(.+)\""), flags))
	std::cout << what[0] << std::endl;
	std::cout << what[1] << std::endl;
	std::cout << what[2] << std::endl;
	std::cout << what[3] << std::endl;
	std::cout << what[4] << std::endl;
	std::cout << what[5] << std::endl;
	std::cout << what[6] << std::endl;
As you can tell, I don't know which index the value gets assigned to. I've seen different examples use 0, 1, and 5 all for single matches. The casting seems necessary to avoid compiler errors (it can't determine the correct iterator).

Any information or pointers would be appreciated. Thanks.