Hi all,

I tried without success to interpolate a variable in a regex in a vimscript;

let x = 3
echo matchstr("abcdef", '.\{'.eval("x").'}')

I was expecting the string "abc" as a result but got a no match.

How could this be done?

Thank you for your help.

ThF

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

Reply via email to