function tagMatcher($tag_name, $close_tags = null)
    {
        $expr = $this->_tag_expr;

        if ($close_tags) {
            $options = implode("|", array_merge(array($tag_name), $close_tags));
            $closer = sprintf("(?:%s)", $options);
        } else {
            $closer = $tag_name;
        }

        $expr = sprintf($expr, $tag_name, $closer);
        return sprintf("/%s/%s", $expr, $this->_re_flags);
    }
function tagMatcher($tag_name, $close_tags = null)
    {
        $expr = $this->_tag_expr;

        if ($close_tags) {
            $options = implode("|", array_merge(array($tag_name), $close_tags));
            $closer = sprintf("(?:%s)", $options);
        } else {
            $closer = $tag_name;
        }

        $expr = sprintf($expr, $tag_name, $closer);
        return sprintf("/%s/%s", $expr, $this->_re_flags);
    }
function tagMatcher ( $ tag_name , $ close_tags = null ) { $ expr = $ this -> _tag_expr ; if ( $ close_tags ) { $ options = implode ( "|" , array_merge ( array ( $ tag_name ) , $ close_tags ) ) ; $ closer = sprintf ( "(?:%s)" , $ options ) ; } else { $ closer = $ tag_name ; } $ expr = sprintf ( $ expr , $ tag_name , $ closer ) ; return sprintf ( "/%s/%s" , $ expr , $ this -> _re_flags ) ; }
Returns a regular expression that will match a given tag in an
SGML string.

@param string $tag_name
@param array $close_tags
@return string
Returns a regular expression that will match a given tag in an SGML string .