Re: regexp select and place elsewhere

2006-06-29 Thread Jerin Joy
I need to use regexp. there are a lot of lines like these. I can't manually do it. Jerin On 6/29/06, Saurabh Jain [EMAIL PROTECTED] wrote: On 6/29/06, Jerin Joy [EMAIL PROTECTED] wrote: Hi, I have data that looks like this input [4:0] a.b.c.d; which I need to replace with input

RE: regexp select and place elsewhere

2006-06-29 Thread Vishnu
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: vim@vim.org Subject: regexp select and place elsewhere Hi, I have

Re: regexp select and place elsewhere

2006-06-29 Thread Jerin Joy
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,

Re: regexp select and place elsewhere

2006-06-29 Thread Christian Ebert
* Jerin Joy on Thursday, June 29, 2006 at 14:28:51 +0530: 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]. :s/\(\[[^]]\+\]\)