Re: Tcl help

#56858
Anonymous
Participant

Uma

I think you are trying to get this as follows:

Your input value is:

“(PRE-POST PAIN SCALE)~&(__-__)(__-__)(__-__)(__-__)(__-__)”

You want the output to be

(PRE-POST PAIN SCALE)

Of if so here is the code fragment. Based on this, build a pre-tcl proc:

hcitcl>set AA “(PRE-POST PAIN SCALE)~&(__-__)(__-__)(__-__)(__-__)(__-__)”

hcitcl>echo $AA

(PRE-POST PAIN SCALE)~&(__-__)(__-__)(__-__)(__-__)(__-__)

hcitcl>set BB [split $AA ~]

hcitcl>echo $BB

{(PRE-POST PAIN SCALE)} &(__-__)(__-__)(__-__)(__-__)(__-__)

hcitcl>set CC [lindex $BB 0]

hcitcl>set CC [lindex $BB 0]

hcitcl>echo $CC

(PRE-POST PAIN SCALE)

Let me know if this work out for you.

-Reggie-  8)

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10