I have two variables and I want to remove the contents of one from the
other. The situation in this case is a directory name (dir) and a
filename (name) which is an absolute path. I want to display the
filename part only with the directories removed.

I have tried various things along these lines:

[% SET dir  = "/a/b/c/d/e/"
       name = "/a/b/c/d/e/d.txt" %]
[% name | remove("^\Q$dir\E") %]

but I am getting nowhere, can someone help me with how I can actually
achieve this aim?

Thanks,

Stephen Quinney

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

Reply via email to