Hello
I am looking for an elegant solution to (within vim script) iterate over all matches of a regular expression in a buffer. That would be something like
fu! DoSpecialThingsWithMatchedLines()
for matched_line_no in (GetMatchedPositions("/foo\\>.*\\<bar"))
let line = getline(matched_line_no)
call DoItPlease(line)
end for
endfu
Is there something like this? I am not necessarily looking for a full fledged solution, any pointer directing me into the right direction will do.
Thanks / Rene