public function pregReplace()
    {
        if ($this->getParameter('pattern') == null)
            return $this->getParameter('subject');
        return preg_replace($this->getParameter('pattern'), $this->getParameter('replace'), $this->getParameter('subject'));
    }
public function pregReplace()
    {
        if ($this->getParameter('pattern') == null)
            return $this->getParameter('subject');
        return preg_replace($this->getParameter('pattern'), $this->getParameter('replace'), $this->getParameter('subject'));
    }
public function pregReplace ( ) { if ( $ this -> getParameter ( 'pattern' ) == null ) return $ this -> getParameter ( 'subject' ) ; return preg_replace ( $ this -> getParameter ( 'pattern' ) , $ this -> getParameter ( 'replace' ) , $ this -> getParameter ( 'subject' ) ) ; }
Performs a regular expression search and replace

Expected Params:
pattern regex  The regular expression used to locate the text to replace
subject string The string to look at
replace string The text to replace the found items with

@return string
Performs a regular expression search and replace