capture-result ( start end string code -- match )


Vocabulary
regexp.captures.private

Inputs
startan object
endan object
stringan object
codean object


Outputs
matchan object


Definition


:: capture-result ( start end string code -- match )
code count>> 1 + 2 * f <array>
:> registers start 0 registers set-nth
end 1 registers set-nth
start end string code table>> registers run-captures [
2 group
[ first2 over [ string <slice> ] [ 2drop f ] if ] map
code names>> regexp-match boa
] [ inconsistent-capture-match ] if* ;