The former is prone to producing stack-overflow as it uses recursion in it match implementation. The migration is entirely mechanical is for the most part. escape() needs some special treatment, looks like boost::regex wants double escaped bacspace.