I want to capture all text & blocks of text between <% and %>.
For example:
Title Here
&l
\<\%(.*?)\%\>
. You need to use .*?
to get non-greedy pattern matching.
EDIT To solve the multiline problem, you can't use the .
wildcard, as it matches everything except newline. This option differs depending on your regular expressions engine. So, I can tell you what to do if you tell me your regex engine.