If i write the next line alone he cut's it for no reason, so...:
Hello,
i need help for this, i'm out of my knowledge.
i'm stuck at a small TPL-System which should do some foreach and if statements. I do this in PHP but idk if this relevant.
https://regexr.com/62ho9 here you can see my issue. I want that the regex end by the second {/if} but it does not. Is there any possible solution to do this with regex?
If not, do you maybe have a good idea for PHP to do what i want? Because i'm out off ideas.
(?<={if \!TEST})([\s\S]*?)(?={\/if})
<a class="dropdown-item" href="#">
{if !TEST}
{USERNAME}
{if !TEST}
HI
{/if}
klöaksdölsa
{/if}
asdas
{if !TEST}asd{/if}
</a>
At the moment i use {if ID statement} LOREM {/if ID} but the more elegant solution would be without an ID :D
(TEST: Hi guys) <-- because he cuts it every time from the start?!