reg exp and removing all data between two strings
Summer <crazysummer2004-/[email protected]> Mon, 1 Jul 2013 17:25:10 -0700 (PDT)
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
Hey All,
I have some template code and I created some custom html tags - but I could use comments too I imagine. Anyways, I can't for the life of me get this to work..
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>)","");
%]
[%
newString = customBLOCK.replace("(?i:<customTag>[.*]</customTag>)","");
%]
[%
newString = customBLOCK.replace("(?i:<customTag>[.]*</customTag>)","");
%]
tried a few more things too.. any ideas?
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates