i am writing an robots.txt parser in c++
boost::regex exrp( "^User-agent:\s*(.*)"); boost:: match_results<string::const_iterator> what; if(boost::regex_search( robots, what, exrp ) ) { string s( what[1].first, what[1].second ); cout<< s; } this should match the useragent with name * but it it returns all datas