I need to separate type and arguments in this expression:
tf->get_TextState()->set_TextMatrix(std::shared_ptr<DOM::Matrix>(new DOM::Matrix(m->get_M11(), -m->get_M12())));
I create the following regex:
std::shared_ptr[ \t]*<(?'type'[A-Z,:,_,a-z,<,>]*){1}>[ \t]*\([ \t]*new[ \t]*(\k'type'){1}(?'args'.*)
The result is:
Group "type": DOM::Matrix
Group "args": (m->get_M11(), -m->get_M12())));
The problem in a "args" group because I need only the: (m->get_M11(), -m->get_M12())
For do that, I change .* to: \([^()]*+(?:(?R)[^()]*+)*+\)
This expression separetly very well work on: (m->get_M11(), -m->get_M12())));
With expected result: (m->get_M11(), -m->get_M12())
But when I add it in whole pattern i.e.:
std::shared_ptr[ \t]*<(?'type'[A-Z,:,_,a-z,<,>]*){1}>[ \t]*\([ \t]*new[ \t]*(\k'type'){1}(?'args'\([^()]*+(?:(?R)[^()]*+)*+\))
It do not matching anything. What I'm doing wrong?
*+supposed to do?