+ std::list<Replace>::iterator bit = replace_list.end();
+ {
+ std::string::const_iterator best_pos = txt.end();
+ std::list<Replace>::iterator it = replace_list.begin();
+ for (; it != replace_list.end(); it++)
+ {
+ if (regex_search(start, end, it->what, it->re))
+ {
+ if (it->what[0].first < best_pos)
+ {
+ best_pos = it->what[0].first;
+ bit = it;
+ }
+ }
+ }
+ if (bit == replace_list.end())
+ break;
+ }
+