Не находит данные по регулярке с++
Ищу в html теги вида <a href=”mailto:адрес”>…</a> , но программа не выводит ничего. Проверял регулярку на regex101, все там находит. Html, в которой ищу тык
#include <iostream>
#include <regex>
#include <fstream>
#include <Windows.h>
using namespace std;
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
cout << "HTML-file: ";
string html, raw, buf;
getline(cin, html);
ifstream file(html);
if (file.is_open())
{
while (getline(file, buf))
{
raw += buf;
}
}
else
{
std::cout << "Error while opening!";
exit(1);
}
file.close();
smatch match;
regex pattern("(<a href=\"mailto:)(.+?)(\">.+?<\/a>)");
while (regex_search(raw, match, pattern))
{
std::cout << match[0] << "\n";
raw = match.suffix().str();
}
cout << "\nPress any key to exit...";
cin.get();
cin.get();
return 0;
}