➕ using Google Benchmark #921

This commit is contained in:
Niels Lohmann committed 2018-01-18 22:00:32 +01:00
1 parent a8f711a2f1
commit b406e3704b
53 files changed
+8039

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#include <regex.h>
#include <string>
int main() {
std::string str = "test0159";
regex_t re;
int ec = regcomp(&re, "^[a-z]+[0-9]+$", REG_EXTENDED | REG_NOSUB);
if (ec != 0) {
return ec;
}
int ret = regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
regfree(&re);
return ret;
}