Thursday, July 28, 2011

Re: substitute pb

On 07/28/2011 04:18 PM, ni va wrote:
> Sorry Tim for my bad english but I am french.

Your English is faaaaaaaar better than my (non-existent) French :)

> Thank you, your help is sufficient.
> 1/ got an output text =>\\255.255.255.255\d$\DIR some text
> 2/ want to substitute to keep only => some text
> 3/ made a pattern that echo cmd shows like this way
> :\\\\255\.255\.255\.255\\d\$\\**DIR
> 4/ and subtitution of this pattern (3/) to the ouput (1) doesn't substitute
> anything.
>
> Thought it was clear

If your cmd in 3/ is the result of

:echo cmd

then your pattern is malformed: it looks like there's a leading
colon (":") and the "**" looks suspicious. I think you want
something like

:%s/\\\\255\.255\.255\.255\\d\$\\DIR

or

:let cmd='\\\\255\.255\.255\.255\\d\$\\DIR'

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: