Apr 19, 2005 #1 ddrillich Technical User Jun 11, 2003 546 US Good Day, We would like to nullify a string when it contains the rca substring. We came up with the following code: set string {XXrcaXX} set isThere [regexp "rca" $string] if {$isThere == 1} { set string "" } Anybody has a simpler version? Thank You, Dan
Good Day, We would like to nullify a string when it contains the rca substring. We came up with the following code: set string {XXrcaXX} set isThere [regexp "rca" $string] if {$isThere == 1} { set string "" } Anybody has a simpler version? Thank You, Dan
Apr 19, 2005 1 #2 Bong Programmer Dec 22, 1999 2,063 US if [string match *rca* $string] {set string ""} _________________ Bob Rashkin rrashkin@csc.com Upvote 0 Downvote