mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
042050ef67
Included sample benchmark for eminline for native and noasm Made GoogleTest compile only if tests are compiled
12 lines
267 B
C++
12 lines
267 B
C++
#include <gnuregex.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;
|
|
}
|
|
return regexec(&re, str.c_str(), 0, nullptr, 0) ? -1 : 0;
|
|
}
|
|
|