classes/phing/util/regexp/Regexp.php
public function replace($subject)
    {
        if ($this->pattern === null || $this->replace === null) {
            throw new RegexpException("Missing pattern or replacement string regexp replace().");
        }

        return $this->engine->replace($this->pattern, $this->replace, $subject);
    }
public function replace($subject)
    {
        if ($this->pattern === null || $this->replace === null) {
            throw new RegexpException("Missing pattern or replacement string regexp replace().");
        }

        return $this->engine->replace($this->pattern, $this->replace, $subject);
    }
public function replace ( $ subject ) { if ( $ this -> pattern === null || $ this -> replace === null ) { throw new RegexpException ( "Missing pattern or replacement string regexp replace()." ) ; } return $ this -> engine -> replace ( $ this -> pattern , $ this -> replace , $ subject ) ; }
Performs replacement of specified pattern and replacement strings.

@param  string $subject Text on which to perform replacement.
@throws RegexpException
@return string subject after replacement has been performed.
Performs replacement of specified pattern and replacement strings .