Contents

Roo

RegexResult.first_match

Returns the first RegexMatch object or Nothing if there are no matches. The same as regexresult.match(0).

var r = |hello|i.match("Hello world!")
# Get the first match.
var first = r.first_match # Could do `var first = r.match(0);`
first.finish # => 5