Так вот моя программа:станд :: алгоритма regex_match() замерзает моя программа
#include "stdafx.h"
#include <iostream>
#include <string>
#include <regex>
#include <windows.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
string str = "<link rel=\"shortcut icon\" href=\"http://joyvy.com/img/favicon.png\" />";
regex expr("<link rel=+(\"|')+shortcut+(.*?(\"|'))+(.*?)href=(\"|')+(.*?)+(\"|')");
smatch matches;
cout << "start..." << endl;
regex_match(str, matches, expr);
cout << "this will not be printed";
}
А вот выход моей программы:
start...
БППП :: алгоритма regex_match вызова() функция просто замораживает мою программу. По истечении 2 или 3 минут он запускает ошибку:
Unhandled exception at at 0x7515B760 in regex.exe: Microsoft C++ exception: std::regex_error at memory location 0x001D9088.
Так что не так?
Да, вы были правы. Благодаря! – Alexandr