Monday, September 8, 2014

How to check either string is present or not in TCL programming?



How to check either string is present or not in TCL programming?


Below is example to search xyz in long string let's say http://xyz.com/home/index.html
set variable_name http://xyz.com/home/index.html
if {![lsearch -regexp $variable_name xyz ]} {
puts " Not found"
exit 1
 } else {
puts "OK"
}

No comments:

Post a Comment