Thread:Extension talk:Loops/MaxLoops/reply (5)

What about the Arrays extension then? You could try to write your own regex engine using the loops extension, string functions and variables. See where just loops leads you? I would either live with the fact that you can't efficiently do what you're trying to do using loops (and then not do it), or just get one of those extensions installed for doing it more efficiently.

Another thought: You're saying the template is included up to 350 times. Is it included doing the same on different strings? If it were the same string several times, you might just want to cache the result by using variables.