replace boost regex with std
This commit is contained in:
12
utils.cpp
12
utils.cpp
@ -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();
|
||||
|
Reference in New Issue
Block a user