Hi I am using sregex_iterator to parse an html file like below. string htmlFile; //populate htmlFile with a file contents regex regExpr("Resurfacing(.|\\n)*Home", boost::regex::icase); sregex_iterator itr(htmlFile.begin(), htmlFile.end(), regExpr); But that is throwing and std::runtime_error exception with message "Regular expression too big". What can i do to avoid this ? I went through http://www.boost.org/libs/regex/doc/configuration.html and changed the variables like below #define BOOST_REGEX_NON_RECURSIVE #define BOOST_REGEX_BLOCKSIZE (4096 * 10) #define BOOST_REGEX_MAX_BLOCKS 1024 Even after that i am getting the same error message. I found that when i changed the regular expression ( i mean a simpler 'regExpr' variable) to a simpler one, the exception (std::runtime_error) was not thrown. I need to parse big html files for some complex regular expressions. I dont mind even if the sregex_iterator takes much memory or time.How can i solve this error. ? Or is this a limitatiton of boost::regex library. Thanks In Advance Kiran.