I was wondering how could I split this string
{{MENU}}<li><a href="{{LINK}}" title="{{TITLE}}"><span>{{TITLE}}</span></a></li>{{/MENU}}
Into array of:
array(
"<li><a href=\"",
"{{LINK}}",
"\" title=\"",
"{{TITLE}}",
"\"><span>",
"{{TITLE}}",
"</span></a></li>"
)
It also should work with more different formats like:
{{MENU}}<a href="{{LINK}}" title="{{TITLE}}">{{TITLE}}</a>{{/MENU}}
{{MENU}}<b><a href="{{LINK}}" title="{{TITLE}}">{{TITLE}}</a></b>{{/MENU}}
My problem is that I don't know how to write this complex regex yet.