capture

capture(an_index)

Returns a text matched with the regular expression and texts of capture groups.

capture(0) returns whole text matched with the regular expression.
capture(1), capture(2) ... return texts of capture groups of $1, $2, ...

Parameters
Result

text