--- a/src/DataMode.h Sun May 23 21:32:37 2021 +0200
+++ b/src/DataMode.h Sun May 23 22:39:45 2021 +0200
@@ -36,7 +36,7 @@
std::vector<relpipe::common::type::StringX> values;
bool matches(int attributeIndex, const std::wregex& pattern) {
- for (int record = 0, attributeCount = attributes.size(), limit = values.size() / attributeCount; record < limit; record++) if (!std::regex_match(values[record * attributeIndex], pattern)) return false;
+ for (int record = 0, attributeCount = attributes.size(), limit = values.size() / attributeCount; record < limit; record++) if (!std::regex_match(values[record * attributeCount + attributeIndex], pattern)) return false;
return true;
}
@@ -81,7 +81,7 @@
};
const std::wregex DataMode::BOOLEAN_PATTERN = std::wregex(L"true|false");
-const std::wregex DataMode::INTEGER_PATTERN = std::wregex(L"[0-9]+");
+const std::wregex DataMode::INTEGER_PATTERN = std::wregex(L"-?[0-9]+");
}
}