I want to capture all text & blocks of text between <% and %>.
For example:
<html>
<head>
<title>Title Here</title>
</head>
<body>
<% include("/path/to/include") %>
<h1>Test Template</h1>
<p>Variable: <% print(second_var) %></p>
<%
variable = value;
foreach(params here)
{
code here
}
%>
<p><a href="/" title="Home">Home</a></p>
</body>
</html>
I have tried \<\%(.*)\%\>
but that will capture everything including <h1>Test Template</h1>
block as well.