protected function execute($string)
    {
        foreach ($this->patternsAndReplacements as $patternAndReplacement) {
            $tmp = preg_replace("/".$patternAndReplacement->pattern."/s", $patternAndReplacement->replacement, $string);
            if ($tmp === null) {
                InvalidExpression::invalidRegex($patternAndReplacement->pattern, $patternAndReplacement->replacement);
            } else {
                $string = $tmp;
            }
        }
        
        return $string;
    }
protected function execute($string)
    {
        foreach ($this->patternsAndReplacements as $patternAndReplacement) {
            $tmp = preg_replace("/".$patternAndReplacement->pattern."/s", $patternAndReplacement->replacement, $string);
            if ($tmp === null) {
                InvalidExpression::invalidRegex($patternAndReplacement->pattern, $patternAndReplacement->replacement);
            } else {
                $string = $tmp;
            }
        }
        
        return $string;
    }
protected function execute ( $ string ) { foreach ( $ this -> patternsAndReplacements as $ patternAndReplacement ) { $ tmp = preg_replace ( "/" . $ patternAndReplacement -> pattern . "/s" , $ patternAndReplacement -> replacement , $ string ) ; if ( $ tmp === null ) { InvalidExpression :: invalidRegex ( $ patternAndReplacement -> pattern , $ patternAndReplacement -> replacement ) ; } else { $ string = $ tmp ; } } return $ string ; }
Handles the data processing
@param string $string The raw text to get parsed
Handles the data processing