Google\Cloud\Dev\Snippet\Parser\Snippet::regexReplace PHP Méthode

regexReplace() public méthode

Hopefully this is obvious, but be careful using this, and only use it when no other feasible options present themselves. It's pretty easy to make your test useless when you're modifying the thing you are trying to test. This is provided for cases when a snippet relies on a global, or on something else which can not be overridden or mocked.
public regexReplace ( string $pattern, string $new ) : void
$pattern string The regex pattern to search for.
$new string The new string to insert.
Résultat void
    public function regexReplace($pattern, $new)
    {
        $this->config['content'] = preg_replace($pattern, $new, $this->config['content']);
    }