diff --git a/opm/simulators/ParallelFileMerger.hpp b/opm/simulators/ParallelFileMerger.hpp index 097d8f52c..ee237c503 100644 --- a/opm/simulators/ParallelFileMerger.hpp +++ b/opm/simulators/ParallelFileMerger.hpp @@ -65,13 +65,12 @@ public: void operator()(const fs::path& file) { - const static boost::regex regex("[^.]+\\.(\\d+)\\.[^.]+"); boost::smatch matches; std::string filename = file.filename().native(); if ( boost::regex_match(filename, matches, fileWarningRegex_) ) { - std::string rank = boost::regex_replace(filename, regex, "\\1"); + std::string rank = boost::regex_replace(filename, fileWarningRegex_, "\\1"); if( boost::regex_match(filename, logFileRegex_) ) {