If you are using Centos7, you are indeed out of luck. The system compiler is unfortunately really bad. Among other problems, the std::regex is completely broken.
You can move to a ROOT version that’s been compiled with a decent compiler, though. By setting up an LCG view from cvmfs, you can work with any compiler/operating system from this list: