I used to be able to write this : void LineTracker::Analyse(const std::string &Buffer) { std::string::const_iterator start, end; start = Buffer.begin(); end = Buffer.end(); boost::regex_grep(std::bind1st(std::mem_fun(&LineTracker::grep_callback), this), start, end, expression); } to get the regex to call back into my class. With the change to the new style using iterator I can do this. void LineTracker::Analyse(const std::string &Buffer) { boost::sregex_iterator m1(Buffer.begin(), Buffer.end(), expression); boost::sregex_iterator m2; std::for_each(m1, m2, *this); } However for_each makes a copy of my class, so at the end it does not update the current instance with the results. What do I need to do to have the the current instance receive the call back from regex? John.