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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nullify a string 1

Status
Not open for further replies.

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
 
if [string match *rca* $string] {set string ""}

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

Part and Inventory Search

Sponsor

Back
Top