Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#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) {
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