Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to TCL: passing argument with curly brace

Status
Not open for further replies.

cacheung

Programmer
Aug 9, 2005
6
CA
How can I remove curly braces from a string using regsub?

I want to do something like
regsub -all {[\{]} $string {} var

where $string contains a left curly-brace and the result is in $var. The above doesn't work.

Thanks in advance.
 
It seems to work for me:
% set string "\{abc"
{abc
% regsub -all {[\{]} $string {} var
1
% set var
abc
%


_________________
Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top