Tcl and clear case to obtain a file name as variable

proc get_view_rel_str {  } {

set cc_view [string trim [lindex [split [exec /opt/rational/clearcase/bin/cleartool pwv] :] end]]
puts $cc_view
set a [exec cleartool setview -exec "ls /mvfs/fos-6000/build/swdl/cpp8548/freebsd/*.CON" $cc_view]
puts $a
set a [string trim [lindex [split $a /] end]]
puts $a
set a [regsub {\.CON$} $a {}]
puts $a
set a [regsub {CPP0} $a {}]
puts $a
set a [regsub {0} $a {.}]
puts $a
}
get_view_rel_str 

this is a script in tcl with clearcase view
the above code gives the output as

view_name_15
/dir/6000/ild/swl/cp5/frd/CPP07011.CON
CPP07011.CON
CPP07011
7011
7.11

but the required output is "R7.1.1" without quotes
can anyone please let me know how do we obtain this.
and also pls help to refine the script to be very simple and short
thanks in advance

---------- Post updated at 11:57 AM ---------- Previous update was at 10:52 AM ----------

I can use join to make the output as R7.11
but i need R7.1.1
and an optimized code.. some one pls help

---------- Post updated at 03:39 PM ---------- Previous update was at 11:57 AM ----------

can anyone help?

Test for two dots and if not, add dot between first pair of digits.