Reputation: 271
This is a follow-up on a long journey where I've pulled my hair out extracting text from parsing GLSL shader files using regex in C++11 with VS 2013 rc5.
Here is the intendant result:
The C++ equivalent looks like this, which is a copycat of the PHP version:
std::smatch u;
std::string s = l_shader->GetData();
std::smatch u;
std::regex_search(s.cbegin(), s.cend(), u, std::regex("<(\\S+)[!]>([.*\\s*\\S*]*?)<[!]\\S+>"));
Unfortunately, std::regex_search doesn't return any results. I've been banging my head trying to figure it out. What am I missing?
Upvotes: 0
Views: 461
Reputation: 490048
It looks like a bug to me. I can confirm that with VC++2013, nothing matches--but with VC++ 2015, each shader matches, as (I think) you expect.
Upvotes: 1