protected function getSearchAndReplace(array $matches, array $data)
    {
        $count = count($matches);
        $alreadySetted = [];
        $search = [];
        $replace = [];

        for ($i = 0, $m = 0; $i < $count; ++$i) {
            if (isset($alreadySetted[$matches[$i]])) {
                continue;
            }

            $value = $this->extractValue($matches[$i], $data);

            if ($value === null) {
                continue;
            }

            $search[$m] = $matches[$i];
            $replace[$m] = $value;
            $alreadySetted[$matches[$i]] = true;
            ++$m;
        }

        return [$search, $replace];
    }