Aug 9, 2005 #1 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.
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.
Aug 10, 2005 #2 Bong Programmer Dec 22, 1999 2,063 US It seems to work for me: % set string "\{abc" {abc % regsub -all {[\{]} $string {} var 1 % set var abc % _________________ Bob Rashkin rrashkin@csc.com Upvote 0 Downvote
It seems to work for me: % set string "\{abc" {abc % regsub -all {[\{]} $string {} var 1 % set var abc % _________________ Bob Rashkin rrashkin@csc.com