diff --git a/update/agent/src/linux/datasid-parse.cpp b/update/agent/src/linux/datasid-parse.cpp index f58bfc3d8784cbc4e7ee668b476cda52d7b0133e..1ff26c8e351e8aa81fd4c9ebb9fc9af5311939a6 100644 --- a/update/agent/src/linux/datasid-parse.cpp +++ b/update/agent/src/linux/datasid-parse.cpp @@ -96,14 +96,20 @@ bool isValid(std::string* line) { normalize(line); int i = 0; + std::cout << "line: " << (*line) << std::endl; + /* if the line is a comment */ if (std::regex_match((*line), std::regex("((\\/\\/)|(\\/\\*)|(\\#))(.*)"))) return false; - /* if the line start with a different character than quote */ + /* + * if the line start with a different character than quote + * Note: this work only for character = letter. + * Case a special character, like ":", "#", it doesn't work. + */ - if (std::regex_match((*line), std::regex("((\\=)|(\\])|(\\[)|(\\{)|(\\})|(\\:))(.*)"))) + if (!std::regex_match((*line), std::regex("(\")(.*)"))) return false; /*