We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    In the last example (test5), the string xxxxxx should be appear, which is not the case. So this doesn’t well perfectly.
      • 30215
      • 79 Posts
      Hmm, there is one more possible situation which could happen: two snippet calls on the same line. For example:

      [!Snippet1? &param1=`xx` &id=`` &param2=`zz`!] hello [!Snippet!]

      Your current regexp ’eats’ hello as well but it shouldn’t. For this particular case is my regexp ’~\[\!.+\!\]~Us’ better but my regexp on the other hand fails with imbricated calls (as you mentioned). Well, it is definitely not going to be easy to fix, good luck with that wink You’re right, Sunday afternoon isn’t a good time, especially when I am supposed to learn for school sad


      This is the document which triggered all this. There’s nothing special about it, I just put each argument on a single line to make it better readable. And that was the problem.

      Btw. Ditto has the similar feature which excludes given snippets from the output code. It might help you with finding the best solution.
        -- sorry for my english, bad teacher smiley