diff --git a/src/ArgumentParser.cpp b/src/ArgumentParser.cpp index f8a5698a8f0fb63fa8cf8adeba971a6017e0ee12..949be69f8dcec28b9ec498f7ca148b43f8a90635 100644 --- a/src/ArgumentParser.cpp +++ b/src/ArgumentParser.cpp @@ -3,7 +3,9 @@ #include #include #include -#include // C++11 +#include +#include +//#include // C++11 #include "Cubism/ArgumentParser.h" @@ -117,7 +119,9 @@ CommandlineParser::CommandlineParser(const int argc, char **argv) // if the current value is numeric and (possibly) negative, // do not interpret it as a key const bool leadingDash = (argv[j][0] == '-'); - const bool isNumeric = std::regex_match(argv[j], std::regex("(\\+|-)?[0-9]*(\\.[0-9]*)?((e|E)(\\+|-)?[0-9]*)?")); + const char c = argv[j][1]; + const bool isNumeric = ((c>='0' && c<='9') || c==0)? true:false; + // const bool isNumeric = std::regex_match(argv[j], std::regex("(\\+|-)?[0-9]*(\\.[0-9]*)?((e|E)(\\+|-)?[0-9]*)?")); if (leadingDash && !isNumeric) break; else