Re: [AOLSERVER] TCL question

2002-02-23 Thread Dossy
On 2002.02.23, Patrick Spence <[EMAIL PROTECTED]> wrote: > - Original Message - > From: "Dossy" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, February 23, 2002 5:22 AM > Subject: Re: [AOLSERVER] TCL question > > > >

Re: [AOLSERVER] TCL question

2002-02-23 Thread Patrick Spence
- Original Message - From: "Dossy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 23, 2002 5:22 AM Subject: Re: [AOLSERVER] TCL question > On 2002.02.22, Patrick Spence <[EMAIL PROTECTED]> wrote: > > My problem is I cannot in

Re: [AOLSERVER] TCL question

2002-02-23 Thread Dossy
This is what happens when I reply before reading the rest of the thread. Duplicated others suggestions. Doh. -- Dossy On 2002.02.23, Dossy <[EMAIL PROTECTED]> wrote: > On 2002.02.22, Patrick Spence <[EMAIL PROTECTED]> wrote: > > My problem is I cannot insert the \ before the & and then wrap w

Re: [AOLSERVER] TCL question

2002-02-23 Thread Dossy
On 2002.02.22, Patrick Spence <[EMAIL PROTECTED]> wrote: > My problem is I cannot insert the \ before the & and then wrap with braces.. Why not? > I am pulling the string to convert from a database and piping it through my > macro routine and I have not been able to figure out how to get it to w

Re: [AOLSERVER] TCL question

2002-02-22 Thread Patrick Spence
f you have received this email in error, please contact the sender and then delete all copies of the message that you have. Thank you. *** - Original Message - From: "Jeff Hobbs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 2:26 PM S

Re: [AOLSERVER] TCL question

2002-02-22 Thread Michael A. Cleverly
If you're using nsd8x (and not nsd76) you can get your desired result by using [string map] instead of [regsub]: proc insert_macro { thestring key macro} { return [string map [list $key $macro] $thestring] } See: http://aolserver.com/docs/devel/tcl/tcl-language/tcl8.x/TclCmd/stri

Re: [AOLSERVER] TCL question

2002-02-22 Thread Jeff Hobbs
Patrick Spence wrote: ... > proc insert_macro { thestring key macro} { > regsub -all -- $key $thestring $macro thestring; > return "$thestring" > } It's not quite clear from your explanation what you really want, and how you want the & handled. However, I suspect that 'string map

Re: [AOLSERVER] TCL question

2002-02-22 Thread Rob Mayoff
+-- On Feb 22, Patrick Spence said: > My problem is I cannot insert the \ before the & and then wrap with braces.. > I am pulling the string to convert from a database and piping it through my > macro routine and I have not been able to figure out how to get it to work > right. You need t

[AOLSERVER] TCL question

2002-02-22 Thread Patrick Spence
This is a stripped down version of a template system I am working on. The problem I am having is that by specification (annoyingly :) ) regsub has this caveat: "If subSpec contains a ``&'' or ``\0'', then it is replaced in the substitution with the portion of string that matched exp. If subSpec