Re: variable substitution within quotes in braces
- From: miguel sofer <miguel.sofer@xxxxxxxxx>
- Date: 4 May 2007 05:05:03 -0700
On May 4, 8:43 am, abhilasha21 <abhilasha21.gu...@xxxxxxxxx> wrote:
Hi All ,
I have been trying to find a way to substitute a variable within
quotes within braces..
eg : i need to pass following string as an argument to a procedure.
{<ab:max><ab:mid="xyz:abc...@xxxxxxxx"/></wyty:ert>}
I want to assign ' xyz:abc...@xxxxxxxx' to a variable say abhi.
so my string should look like :
{<ab:max><ab:mid="$abhi"/></wyty:ert>} .
Can anyone please help me to solve this trick in TCl..?
Thanks in advance ...
Abhilasha
Does this answer your question?
% set x xyz:abc123@xxxxxxxx
xyz:abc123@xxxxxxxx
% set y {<ab:max><ab:mid="$x"/></wyty:ert>}
<ab:max><ab:mid="$x"/></wyty:ert>
% set z [subst -nocommands $y]
<ab:max><ab:mid="xyz:abc123@xxxxxxxx"/></wyty:ert>
If not, maybe the following does:
% set y {{<ab:max><ab:mid="$x"/></wyty:ert>}}
{<ab:max><ab:mid="$x"/></wyty:ert>}
% set z [subst -nocommands $y]
{<ab:max><ab:mid="xyz:abc123@xxxxxxxx"/></wyty:ert>}
.
- References:
- variable substitution within quotes in braces
- From: abhilasha21
- variable substitution within quotes in braces
- Prev by Date: Re: validation problem
- Next by Date: Re: Wiki back up?
- Previous by thread: variable substitution within quotes in braces
- Next by thread: Re: variable substitution within quotes in braces
- Index(es):
Relevant Pages
|