Hello, the next program doesn't work. It should print all the lines except the ones starting with '#'. It does work in perl : $ perl -ne 'print unless /^\s*\#/' a.cc why ? Thank you aitor ------------------- // a.cc #include<iostream> #include<fstream> #include<string> #include<vector> #include<boost/regex.hpp> int main() { using namespace std; ifstream f("a.cc"); string l; vector<string> v; static const boost::regex r("^\\s*\\#", boost::regbase::escape_in_lists | boost::regbase::perl); while(f) { getline(f,l,'\n'); if (boost::regex_match(l,r)) continue; v.push_back(l); } for(vector<string>::const_iterator it = v.begin(); it != v.end(); ++it) cout << *it << endl; }