Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
let test = 'a href="http://www.google.com">www.google.com</a;'
vimscriptでhttp://www.google.com、正規表現を使用してこれから抜け出し、別の変数に格納するにはどうすればよいですか?
http://www.google.com
これに関するドキュメントが見つからないようです。
let url = matchstr(test, '\ca href=\([''"]\)\zs.\{-}\ze\1') if empty(url) throw "no url recognized into ``".test."''" endif
詳細については、以下を参照してください。
:h matchstr() :h /\c :h /\zs :h /\{-