src/Strings/Strings.php
public function pregReplace($pattern, $replace, $limit = -1, &$count = null)
    {
        $this->string = preg_replace($pattern, $replace, $this->string, $limit, $count);

        return $this;
    }
public function pregReplace($pattern, $replace, $limit = -1, &$count = null)
    {
        $this->string = preg_replace($pattern, $replace, $this->string, $limit, $count);

        return $this;
    }
public function pregReplace ( $ pattern , $ replace , $ limit = - 1 , & $ count = null ) { $ this -> string = preg_replace ( $ pattern , $ replace , $ this -> string , $ limit , $ count ) ; return $ this ; }
Preg replace text in string.

@param  string $pattern
@param  string $replace
@param  int    $limit
@param  int    $count
@return self
Preg replace text in string .