Josh Rosenbaum wrote:

> Hi Ronald,
> 
> The replace filter should work fine with backrefs if you're using a newer 
> version of TT. (I believe 2.14a or above.)

Unfortunately, it's not working for me.  Perhaps I'm overlooking something?


% perl -MTemplate -le 'print $Template::VERSION'
2.19

[% Catalyst.localize('You have [quant,_1,new message].',
                      new_message_count)
    | replace('(\d+)', '<span class="highlight">$1</span>') %]

Result:

   You have <span class="highlight">$1</span> new messages.

The $1 is inserted as a literal string.


Ronald

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to