src/CodeGeneration/Filesystem/File/FindReplace.php
public function findReplaceRegex(string $find, string $replace)
    {
        $contents = $this->file->getContents();
        $contents = \preg_replace($find, $replace, $contents, -1/*, $count*/);

        $this->file->setContents($contents);
    }
public function findReplaceRegex(string $find, string $replace)
    {
        $contents = $this->file->getContents();
        $contents = \preg_replace($find, $replace, $contents, -1/*, $count*/);

        $this->file->setContents($contents);
    }
public function findReplaceRegex ( string $ find , string $ replace ) { $ contents = $ this -> file -> getContents ( ) ; $ contents = \ preg_replace ( $ find , $ replace , $ contents , - 1 /*, $count*/ ) ; $ this -> file -> setContents ( $ contents ) ; }
Find and replace using preg_replace

@param string $find
@param string $replace
Find and replace using preg_replace