Newer
Older
--- RelocObject.cpp 2024-09-26 20:00:54.937679755 +0200
+++ RelocObject_corrected.cpp 2024-09-26 19:59:16.044769402 +0200
@@ -46,7 +46,7 @@
std::stringstream ss;
write_json(ss, this->toPropertyTree(), prettyJson);
// workaround inspired by: https://stackoverflow.com/a/56395440
- std::regex reg("\\\"([0-9]+\\.{0,1}[0-9]*)\\\"");
+ std::regex reg("\\\"([-+]?[0-9]+\\.{0,1}[0-9]*)\\\"");
std::string result = std::regex_replace(ss.str(), reg, "$1");
return result;
}