I have a string, I want to check if any strings from an array is a part of it or not:
set name abcxyz
set array [list abc efg hij]
set List [join $array "|"]
if {[regexp {($List)} $name]} {
...
}
I don't want to use foreach loop is because there are some other condition in the if statement, and each will require a foreach loop. Then the run time would increase a lot.
Any help is appreciated!