*/
#include <netdb.h>
+#include <regex>
#include "common/address_helper.h"
-#include "boost/regex.hpp"
-
// decode strings like "tcp://<host>:<port>"
int entity_addr_from_url(entity_addr_t *addr /* out */, const char *url)
{
- using namespace boost;
-
- regex expr("(tcp|rdma)://([^:]*):([\\d]+)");
- cmatch m;
+ std::regex expr("(tcp|rdma)://([^:]*):([\\d]+)");
+ std::cmatch m;
- if (regex_match(url, m, expr)) {
+ if (std::regex_match(url, m, expr)) {
string host(m[2].first, m[2].second);
string port(m[3].first, m[3].second);
addrinfo hints;
#include "include/stringify.h"
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
-#include <boost/regex.hpp>
+#include <regex>
// Definitions for enums
#include "common/perf_counters.h"
.set_default("rbd")
.set_description("default pool for storing new images")
.set_validator([](std::string *value, std::string *error_message){
- boost::regex pattern("^[^@/]+$");
- if (!boost::regex_match (*value, pattern)) {
+ std::regex pattern("^[^@/]+$");
+ if (!std::regex_match (*value, pattern)) {
*value = "rbd";
*error_message = "invalid RBD default pool, resetting to 'rbd'";
}
.set_default("")
.set_description("default pool for storing data blocks for new images")
.set_validator([](std::string *value, std::string *error_message){
- boost::regex pattern("^[^@/]*$");
- if (!boost::regex_match (*value, pattern)) {
+ std::regex pattern("^[^@/]*$");
+ if (!std::regex_match (*value, pattern)) {
*value = "";
*error_message = "ignoring invalid RBD data pool";
}