For years one of my “Soapbox” issues has been to treat lists as lists and strings as strings. Tcl 8.5 makes that even more important.
The lrange command will return a *LIST* though some treat it as a string
In Tcl 8.4 you see the following:
tcl>set lst
A # B
tcl>lrange $lst 1 1
#
However in Tcl 8.5+ it becomes:
tcl>set lst
A # B
tcl>lrange $lst 1 1
{#}
If you attempt to do commands like regexp, string equal, etc against the results it will give you different results. Note that {*} is a legitimate list with one value. This quoting seems to occur with special characters
If you really want to treat the results as a string, first convert to string:
regexp — {#} [lindex [lrange $lst 1 1] 0] OR
regexp — {#} [join [lrange $lst 1 1]]
You may have to modify 8..4 scripts if this applies.