Download gemma.cpp/build/_deps/benchmark-src/cmake/gnu_posix_regex.cpp from ZeroWw/gemma-2-9b-SBS: direct link, hf CLI and curl.
- Browser
- Download file 267 Bytes
-
https://huggingface.co/ZeroWw/gemma-2-9b-SBS/resolve/main/gemma.cpp/build/_deps/benchmark-src/cmake/gnu_posix_regex.cpp
- Command line
-
hf download hf://ZeroWw/gemma-2-9b-SBS/gemma.cpp/build/_deps/benchmark-src/cmake/gnu_posix_regex.cpp
-
curl -L -o gnu_posix_regex.cpp https://huggingface.co/ZeroWw/gemma-2-9b-SBS/resolve/main/gemma.cpp/build/_deps/benchmark-src/cmake/gnu_posix_regex.cpp
267 Bytes
| 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; | |
| } | |