Hi.

I want to reorder variable2 and variable3 from the following line structure for 44 lines in a datafile, the data field separator is a "((" character

variable1 data((variable2 data((variable3 data((variable4 data ((variable5 data((variable6 data((variable7 data((variable8 data ((variable9 data(( .. (( (end of line. some lines have upwards to 20 or more variables)

to

variable1 data((variable3 data((variable2 data(( etc

when I use the following syntax (which I extrapolated from sec 12.2 of VIM manual, version 6.3):

6,50s;\(variable2.*\)((;\(variable3.*\);\2\1;

"variable3 data" is correctly moved into the position formerly held by "variable2 data". However, "variable2 data" is appended to the end of the entire line and NOT moved to the position that was formerly taken by "variable3 data"

Any ideas as to what's wrong?

Thanks

Mike

Reply via email to