public function doRegexpReplace($searchPattern, $replaceWith)
    {
        $this->content = preg_replace_callback(
            $searchPattern,
            function($matches) use ($replaceWith) {
                $indent = isset($matches['indent']) ? $matches['indent'] : '';
                $output = $indent;
                $output .= isset($matches['start']) ? $matches['start'] : '';
                $output .= isset($matches['target']) ? Formatter::indentLines($replaceWith, mb_strlen($indent), true) : '';
                $output .= isset($matches['end']) ? $matches['end'] : '';

                return $output;
            },
            $this->content
        );

        return $this;
    }