In a tclproc, I have this lsearch working: set index1 [lsearch -regexp $list1 $pattern1], but only when there are no spaces in $list1 and $pattern1.
I can remove all spaces from both and then get a match but I’d rather know if there’s a way to include spaces in both.
Example: I want $list1 line “abc xyz” to match $pattern1 line “abc xyz”.
I’ve searched the forum and manuals but can’t find anything about spaces.