I build boost::regex 1.34 using Borland BDS 2006. Simple regular expresions works fine, but I have problem with this regular expresion: ^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$ if a try to match it with any string longer then 22 bytes, regex throws exception. After some investigations i simplified regular expresion to ^[10+]*@$ and it still throws exception code I use: boost::regex e("^[10+]*@$"); boost::match_resultsstd::string::const_iterator what; if(0 == boost::regex_match(input, what, e, boost::match_default | boost::match_partial)) // here function throw exception { throw std::runtime_error("Invalid data entered - this could not possibly be a valid card number"); } if(what[0].matched) { return true; } return false; Milan Bacik