Extract and Replace unknown string between pattern by variable : I have an expression that looks like this :
**when v(xsram.xgio0_right.xgio_bit2.xldp.xprech_wd.m0_1_1.d) ='v(xsram.xgio0_right.xgio_bit2.xldp.xprech_wd.m1_1_1.d)+5.0'**

I want to extract the text between v() and save it in a variable and replace this text with the variable name in the expression. So the final output will be:

**when v($VAR1) ='v($VAR2)+5.0'**

while $VAR1=xsram.xgio0_right.xgio_bit2.xldp.xprech_wd.m0_1_1.d
and $VAR2=xsram.xgio0_right.xgio_bit2.xldp.xprech_wd.m1_1_1.d

Any ideas how to get this done ? I basically need to do this because i need to undergo some text processing on the text saved in the variables and then put it back in place in the original expression. So the final expression will look like this :

**when v(xsram.xgio0_right^xgio_bit2^xldp^xprech_wd^m0_1_1:d) ='v(xsram.xgio0_right^xgio_bit2^xldp.xprech_wd^m1_1_1:d)+5.0'**

Thanks in advance!