Skip to content
Snippets Groups Projects
Commit d2898b84 authored by Lais Frigério's avatar Lais Frigério
Browse files

Replace regex fuctions to libre2

parent 6d7dfc49
No related branches found
No related tags found
2 merge requests!51Merge development to master,!32Issue/10
......@@ -100,23 +100,19 @@ bool isValid(std::string* line) {
std::string str(s);
// re2::StringPiece input(str);
re2::RE2 re("((\\/\\/)|(\\/\\*)|(\\#))(.*)");
// assert(RE2::FullMatch("ruby:1234", "(\\w+):(\\d+)", &s, &i));
// assert(s == "ruby");
// assert(i == 1234);
// re2::RE2 re("((\\/\\/)|(\\/\\*)|(\\#))(.*)");
normalize(line);
/* if the line is a comment */
// if(std::regex_match((*line),std::regex("((\\/\\/)|(\\/\\*)|(\\#))(.*)")))
// return false;
if (RE2::FullMatch(s, "((\\/\\/)|(\\/\\*)|(\\#))(.*)"))
return false;
/* if the line start with a different character than quote */
// if (!std::regex_match((*line), std::regex("(\")(.*)")))
// return false;
if (!RE2::FullMatch(s, "(\")(.*)"))
return false;
/*
* if the line start with quote,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment