Remove std::regex which is not supported by gcc 4.8
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631