Hi Summer -

> I want to omit the tags and everything in between.
> 
> 
> [% customBlock = BLOCK;
> '<customTag>';
> A BUNCH OF TT STUFF
> '</customTag>'
> %]
> 
> [%
> newString = customBLOCK.replace("(?i:<customTag>[.*?]</customTag>)","");
> %]

First, I think to do the case-insensitive matching you need to have
"(?i)" at the front - note the surrounding parens.  Second, anything in
square brackets like "[...]" means you are trying to match a range of
characters, so in this case it thinks you want to match a single
character that is either a period, an asterisk, or a question mark.

Not tested, but you might need something like:

    newString = customBLOCK.replace("(?i)<customTag>.*?</customTag>",
    "");


HTH,
Larry

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to