> > I was looking through H::T when I noticed that it splits the incoming template > > using: > > > > split ( /(?<=)/ , $template) > > > > This regex ends up splitting on every '<'. > > > > I have modified my version to use: > > > > split( m!(?=<(?:\!--\s*)?/?[Tt][Mm][Pp][Ll]_)! , $template) > > > > which thus matches only on <TMPL_ and </TMPL_ tags. > > > > Won't this break if you use the <!-- TMPL... --> constructs of putting > the TMPL tags within HTML comments?
Not from my testing it didn't; this regex only matches on: <TMPL_ </TMPL_ <!-- TMPL_ <!-- /TMPL_ doesn't matter where the TMPL_ construct is located. However you could be right as there may be some cases where the regex doesn't quite match correctly, although I cant think of such a situation. cheers, Mathew ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users