Hi,
while writing the test for checking the URLs I stumbled on this 
difference between submatch(1) and \1:
#v+
let a = '    https://www.vim.org   '
let g:pat = '.\{-}\(http[^ ]*\).\{-}$'
echo substitute(a, g:pat, submatch(1), '')
echo substitute(a, g:pat, '\1', '')
#v-

If you execute this piece of script, the first map() returns an empty 
list, while the second map() returns the URL stripped by whitespace 
(which would be my expected behaviour for both map() calls).

Is this expected?

Christian
-- 
Es heißt abergläubisch sein, wenn man seine Hoffnung auf die
Formalitäten setzt; aber es heißt hochmütig sein, wenn man sich ihnen
nicht unterwerfen will.
                -- Blaise Pascal (Pensées)

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui