--- "Randal L. Schwartz" <[email protected]>
wrote:

> >>>>> "James" == James L <[EMAIL PROTECTED]> writes:
> 
> James> hello,
> James> I am trying to replace a variable using
> 
> James> [% field | replace("\b${word}\b",
> "<b>${word}</b>") %]
> 
> Does the field variable contain any backspaces?  If
> not, that's not gonna
> work, ever.
> 
> Hint:  \b is a backspace.
> Bigger hint: you might want \\b instead.

oh?? my purpose of using \b is word boundary. 

i probably should use single quote there like 
[% field | replace('\b${word}\b',> "<b>${word}</b>")
%]

but 'word' won't interpolate.
 
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services,
> Inc. - +1 503 777 0095
> <[email protected]>
> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing,
> Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and
> open-enrollment Perl training!
> 

James.


 
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

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

Reply via email to