Subject: | 'replace' filter does not take back-references |
Date: | Mon, 5 Oct 2009 16:04:50 +0200 |
To: | bug-Template-Toolkit [...] rt.cpan.org |
From: | "Mauritz Hansen" <mauritzhansen [...] xs4all.nl> |
Hi folks,
I have just been beating my head against the table for a while with this
problem. According to the manual for the replace method:
__QUOTE__
You can use $1, $2, etc., to reference captured parts (in parentheses) in
the regular expression.
__END QUOTE__
The problem is that the 'replace' FILTER does not seem to work with these
back-references, and simply produces the literal $1, etc. Now I don't know
if this is a limit with the way the filters work or if this has simply not
yet been implemented for the filter. If this cannot work for the filter,
it would help to have a note for the 'replace' filter to specifically
state that it does not work here.
Thanks for this great module.
Mauritz Hansen