public function replace(string $regex, string $replacement) : Text
    {
        return $this->pipe(
            function (string $value) use ($regex, $replacement) {
                return preg_replace($regex, $replacement, $value);
            }
        );
    }