Code: Select all
if {[lsearch -exact [string tolower $url] "reuters"] != -1} {
# it matches..
}
As you can see is working fine at me.. probably your $url is not good or something..[11:31] (caesar): .tcl set url "foo bar reuters moo" ; if {[lsearch -exact [string tolower $url] "reuters"] != -1} { putlog "bla" }
[11:31] (Toy): [11:31] bla
[11:31] (Toy): Tcl:
why not using string match -nocase *reuters* ? isn't $url a string?caesar wrote:Code: Select all
if {[lsearch -exact [string tolower $url] "reuters"] != -1} { # it matches.. }
i think he meant himself.NewzBoy wrote:lazy? his worked and yours didn't so I'd ask myself who is the lazy one