Try
set results [regexp -inline -all {stackoverflow.} $test]
puts [lindex $results 4]
I'll be back to explain it further by making pancakes right now.
So.
The command returns a list ( -inline) of all ( -all) substrings of the string contained in testthat matches the string "stackoverflow" (fewer quotation marks) plus one character, which can be any character. This list is stored in a variable resultand by indexing with 4 (since indexing is based on zero), the fifth element of this list can be retrieved (and in this case printed).
: , , . , , , "stackoverflow" .
ETA ( ): , . -indices ( : , "stackoverflow" ):
set indices [regexp -inline -all -indices {stackoverflow} $test]
string range, :
puts [string range $test {*}[lindex $indices 4]]
lindex $indices 4 186 198; {*} string range.