Switched to std::regex as it's fairly usable as of gcc 4.9