DynuIPRefresher/src/IpHelper.cpp
Lukas Heiligenbrunner 41a8e8e7e1 readd libconfig
correct regex to proof correct api
2020-10-12 01:55:58 +02:00

8 lines
201 B
C++

#include <regex>
#include "IpHelper.h"
bool IpHelper::isIpValid(const std::string& ip) {
const std::regex rgx(R"(^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$)");
return (std::regex_match(ip, rgx));
}