// +----------------------------------------------------------------------+ // /** * The html Body only filter * * @abstract * a Simple filter to remove the everything thats not in the body! * * @package HTML_Template_Flexy * */ class HTML_Template_Flexy_Compiler_Regex_BodyOnly { /** * Standard Set Engine * * * @param object HTML_Template_Flexy the main engine * @access private */ function _set_engine(&$engine) { } /** * Strip everything before and including the BODY tag * * @param string The template * @access public */ function strip_body_head ($input) { if (!preg_match("/^(.*)]*)>/si", "",$input); return $input; } /** * Strip everything after and including the end BODY tag * * @param string The template * @access public */ function strip_body_foot ($input) { if (!preg_match("/<\/body>.*/si", $input)) { return $input; } $input = preg_replace("/<\/body>.*/si", "",$input); return $input; } } ?>