Thursday, July 28, 2011

substitute pb

Hi,

Using net view command on windows provide me the following output:

\\255.255.255.255\d$\DIR some text

I would like to substitute this network path \\255.255.255.255\d$\DIR
to the output.


I have done this assuming path is \\255......\DIR

let pattern=substitute(path,'\\','\\\\','g')
let pattern=substitute(pattern,'\$','\\$','')
let pattern=substitute(pattern,'\.','\\.','')

this works fine and obtain this \\\\255\.255\.255\.255\\d\$\\DIR when
I echo pattern var.

Now I launch substitute(output,pattern,'','g') andit fails, my output
is still
\\255.255.255.255\d$\DIR some text

out of
some text

--
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: