Hey I am learning the regex and I am confused why this expression return 0? It should return 1 as the string "zy" matches in my expression..
#include <iostream>
#include <string>
#include <regex>
#include<bits/stdc++.h>
using namespace std;
int main() {
string s2="ezyfo";
bool result=regex_match(s2,regex("zy")) ;
cout<<result; //output is 0 while "zy should match in the string s2
return 0;
}
output is
0