Thanks guys, I was looking for the ()

Jerin

On 6/29/06, Vishnu <[EMAIL PROTECTED]> wrote:
Hi Jerin,

Use the following reg exp,

:%s/\(\[\d\+:\d\+] \)\(.*\.\)\(\i\+\);/\2\3 \1\3;/


:h \(


~VIshnu

> -----Original Message-----
> From: Jerin Joy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 29, 2006 2:29 PM
> To: [email protected]
> Subject: regexp select and place elsewhere
>
> Hi,
>
> I have data that looks like this
>
> input [4:0] a.b.c.d;
> which I need to replace with
> input a.b.c.d [4:0] d;
>
> ie. I want to copy a.b.c.d and place it after input and replace it
> with d after [4:0].
>
> I'm fairly comfortable with regexp but I'm not sure how to select and
> copy the text to another place on the line.
> Could someone help me out here.
>
> thanks,
> Jerin
>
> --
> http://jerinj.blogspot.com/
> --




--
http://jerinj.blogspot.com/
--

Reply via email to