Fix terminate called after throwing an instance of 'std::regex_error'
what(): Invalid start of '[x-x]' range in regular expression
Change-Id: I97a7f57da8869d47400bfca26bfc5ff839fc0fa4
int CustomTemplate::add(const std::string& name, const std::string& attrTmpl)
{
- static std::regex nameRegex(R"~(^[\w-\._\/]+$)~", std::regex::optimize);
+ static std::regex nameRegex(R"~(^[\w\-\._\/]+$)~", std::regex::optimize);
IF_FAIL_RETURN_TAG(std::regex_match(name, nameRegex), CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER, _E, "Invalid name");
Json::Value tmplJson;