> I need replace backslashes with double backslashes. I try
> many
> variants. For example:
> [% text.replace('\\', '\\\\') %]
> But they don't work:(
replace method doesn't changes the string - it returns a new string.
This should work:
[% text = text.replace('\\', '\\\\') %]
And, maybe the better way is to replace characters in a perl script, not in
template, keeping templates for design.
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates