private function match(Definition $definition, $stepText, array $multiline)
    {
        $regex = $this->patternTransformer->transformPatternToRegex($definition->getPattern());

        if (!preg_match($regex, $stepText, $match)) {
            return null;
        }

        $function = $definition->getReflection();
        $match = array_merge($match, array_values($multiline));
        $arguments = $this->argumentOrganiser->organiseArguments($function, $match);

        return new SearchResult($definition, $stepText, $arguments);
    }