Skip to content

Instantly share code, notes, and snippets.

@rocallahan
Created November 30, 2020 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocallahan/73efdd04aa762733fdd35fdccca1e65e to your computer and use it in GitHub Desktop.
Save rocallahan/73efdd04aa762733fdd35fdccca1e65e to your computer and use it in GitHub Desktop.
test.cc
#include <cctype>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <regex>
int main() {
std::string str("abcdefg");
std::regex pattern(".+");
bool result = std::regex_match(str, pattern);
if (!result) {
abort();
}
for (auto &c : str) {
printf("%d\n", c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment