I was looking for something similar to Python's re.findall()/finditer()
function to answer a question on Reddit[1] but was surprised I
couldn't find anything in
:help function-list
The general intent would be to take an input string and return a
List containing all the sub-strings matching a pattern like
let matches=findall('amwenxipyuqz', '[aeiou]')
would set matches to
['aw', 'en', 'ip', 'uq']
I was able to cobble together a hack-job in this case, but I'd hoped
to be able to do something like
:let a=[] | g/#\w\+/call extend(a, findall(getline('.'), @/))
Does such a function exist and I just missed it?
Thanks!
-tim
[1]
https://www.reddit.com/r/vim/comments/18pcd84/the_vim_way/kenedxq/