replace boost regex with std

This commit is contained in:
2020-03-18 22:00:15 +01:00
parent 71bfa56e3b
commit 5df89f0491
4 changed files with 12 additions and 12 deletions

View File

@ -135,16 +135,16 @@ std::string utils::readCompleteFile(std::string_view filepath)
return content;
}
std::string utils::regex_callback_replacer(boost::regex regex, const std::string &input,
std::function<std::string(boost::smatch &)> callback)
std::string utils::regex_callback_replacer(std::regex regex, const std::string &input,
std::function<std::string(std::smatch &)> callback)
{
std::string result;
auto tagsbegin = boost::sregex_iterator(input.begin(), input.end(), regex);
auto tagsend = boost::sregex_iterator();
auto tagsbegin = std::sregex_iterator(input.begin(), input.end(), regex);
auto tagsend = std::sregex_iterator();
auto matchbegin = 0;
for(boost::sregex_iterator i = tagsbegin; i != tagsend; ++i)
for(std::sregex_iterator i = tagsbegin; i != tagsend; ++i)
{
boost::smatch match = *i;
std::smatch match = *i;
auto matchlength = match.length(0);
auto matchpos = match.position();