From: Tobias Luetke Date: 2005-10-19T03:25:03+09:00 Subject: Re: Regexp problem for template language I omitted the {{ }} search from the regexp for this example, the second part was only for trying to get all the text in between {% tags %}. Thanks to Sean for providing an working way to do satisfy the test cases this in one call! On 10/18/05, Kevin Ballard wrote: > If you want between {{ }} variables, shouldn't that second branch of > the regexp be {2,} rather than +? Not to mention that it never matches > the closing }}. > > It might be better to, instead of trying to do it all with just a > regex, implement a stateful parser that matches an opening tag and > matches a closing tag from there. That way you can also add spiffy > stuff like nested tags. > > > -- Tobi http://jadedpixel.com - modern e-commerce software http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog