pub(crate) fn find_one<'a>(
        vm: &mut VM,
        re: &Regex,
        given: &'a str,
    ) -> Result<Option<Match<'a>>, RubyError> {
        match re.captures(given) {
            Ok(None) => Ok(None),
            Ok(Some(captures)) => {
                vm.get_captures(&captures, given);
                Ok(captures.get(0))
            }
            Err(err) => Err(RubyError::internal(format!("Capture failed. {:?}", err))),
        }
    }
Find the leftmost-first match for `given`.
Returns `Match`s.
ruruby/src/builtin/regexp.rs