#include <iostream>
#include <regex>
using namespace std;

int main() {
	std::string s = "name=\"bla \\\"bla\\\"\"";
	std::regex TheName(R"(name=\"([^\"\\]*(?:\\.[^\"\\]*)*)\")");
	std::smatch m;
    if (regex_search(s, m, TheName)) {
			std::cout << m[1].str() << std::endl;
	}
	return 0;
}