Paste: comma word example

Author: rien
Mode: factor
Date: Mon, 14 Nov 2011 20:23:17
Plain Text |
! this doesn't call "match"
:: match-all+so ( regexp string start options -- match-collection/f )
    string utf8 encode :> subject ! subject as a byte-array
    start :> pos!
    [
        [ regexp subject pos options pcre-exec 1 >= ] ! vector ret -- vector
        [ dup , groups>> first to>> pos! ]
        while
    ] { } make :> vector drop ! f vector --
    vector empty? [ f ] [ subject regexp vector <mc> ] if ;

New Annotation

Summary:
Author:
Mode:
Body: