use raw character data for regex definition
This commit is contained in:
parent
983ae8a412
commit
63df16831e
|
@ -88,7 +88,7 @@ std::string Method::name() const
|
|||
*/
|
||||
bool Method::setName(std::string name)
|
||||
{
|
||||
std::regex bad_chars("[ #*,/\?\[]\{}]"); // ' ' # * , / ? [ ] { }
|
||||
std::regex bad_chars(R"([ #*,/\?\[\]\{\}])"); // ' ' # * , / ? [ ] { }
|
||||
if (std::regex_search(name, bad_chars))
|
||||
return false;
|
||||
name_ = name;
|
||||
|
|
Loading…
Reference in New Issue