Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 50212
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: mauritzhansen [...] xs4all.nl
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Ticket migrated to github as https://github.com/abw/Template2/issues/88