regexp {c.*g} "abcdefghi" matched
puts $matched ;# ==> cdefg
regexp {c((.*)g)} "abcdefghi" matched sub1 sub2 sub3
puts $matched ;# ==> cdefghi
puts $sub1 ;# ==> defg
puts $sub2 ;# ==> def
puts $sub3 ;# ==> hi