Language:
None specified     Change language:
Pastebin: 132671
Author: Araxia
Subject: Vim Pastebin plugin post
Created: 2010-02-08 20:23:58
Download and save
Toggle line numbers
1function! AccumulateMatches(line, matches, start) 
2    let l:mynext = match(a:line, '<\(\/\)\{0,}\(\S\)\+', a:start) 
3    if l:mynext > -1 
4        let l:mymatch = matchstr(a:line, '<\(\/\)\{0,}\(\S\)\+', a:start) 
5        call add(a:matches, l:mymatch) 
6        return AccumulateMatches(a:line, a:matches, l:mynext + 1) 
7    endif 
8    return a:matches 
9endfunction 
10echo AccumulateMatches("<a href='foo'>asdfasdfasf</a>", [], 0) 
Thread:
[132671] Vim Pastebin plugin post by Araxia at 2010-02-08 20:23:58
  [132672] Re: Vim Pastebin plugin post by Anonymous at 2010-02-08 20:24:19 (diff)
    [132673] Re: Vim Pastebin plugin post by Anonymous at 2010-02-08 20:24:40 (diff)
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.