1 2 3 4
set myString {A/B/C/P/E} regexp -- {(.*)/\S+} $myString -> match puts $match # => A/B/C/P
1
A/B/C/P