I m studying regular expressions in c++11 and this regex search is returning false anybody knows what i m doing wrong here. The search works if i use the pattern "<. * >" . I know that .* stands for amy number of characters except newline
#include<regex>
#include<iostream>
using namespace std;
int main()
{
bool found = regex_match("<html>",regex("h.*l"));// works for "<.*>"
cout<<(found?"found":"not found");
return 0;
}
Aucun commentaire:
Enregistrer un commentaire