Hello!
I'd like to mimick (reproduce) Expression Engine's fantastic template parsing method. (Pls don't ask me why not using it :))
While i'm able to find and parse simple tags like
{example_param = "param_value"}
i cannot parse tags where closing tag added:
{cyclic_param}
...
{/cyclic_param}
This is the pattern i'm using:
'/[\{^\/](.*)\}/iU'
but it's returns {/cyclic_param} too.
I know there are zillions of regexp tutors out there but this is the thing i cannot understand ever :( (And i cannot figure out from EE's source)
How can i find opening and closing tags (with their inner blocks too) with PHP's regexp?
Thanks for your help!