private function removeEval(&$pattern)
    {
        if (is_array($pattern)) {
            foreach ($pattern as $key => $value) {
                $pattern[$key] = $this->removeEval($value);
            }
        } elseif (is_string($pattern)) {
            $pattern = trim($pattern);
            $mods = strrpos($pattern, substr($pattern, 0, 1));
            $pattern = substr($pattern, 0, $mods).str_replace('e', '', substr($pattern, $mods));
        }

        return $pattern;
    }
private function removeEval(&$pattern)
    {
        if (is_array($pattern)) {
            foreach ($pattern as $key => $value) {
                $pattern[$key] = $this->removeEval($value);
            }
        } elseif (is_string($pattern)) {
            $pattern = trim($pattern);
            $mods = strrpos($pattern, substr($pattern, 0, 1));
            $pattern = substr($pattern, 0, $mods).str_replace('e', '', substr($pattern, $mods));
        }

        return $pattern;
    }
private function removeEval ( & $ pattern ) { if ( is_array ( $ pattern ) ) { foreach ( $ pattern as $ key => $ value ) { $ pattern [ $ key ] = $ this -> removeEval ( $ value ) ; } } elseif ( is_string ( $ pattern ) ) { $ pattern = trim ( $ pattern ) ; $ mods = strrpos ( $ pattern , substr ( $ pattern , 0 , 1 ) ) ; $ pattern = substr ( $ pattern , 0 , $ mods ) . str_replace ( 'e' , '' , substr ( $ pattern , $ mods ) ) ; } return $ pattern ; }
Remove 'e' eval modifier from pattern.

@param mixed $pattern Regex backslashes must be double-escaped to work properly ie. '//'

@return mixed

@link http://php.net/manual/en/reference.pcre.pattern.modifiers.php#reference.pcre.pattern.modifiers.eval
@link http://twig.sensiolabs.org/doc/templates.html#comparisons
Remove e eval modifier from pattern .