function get_tag_regex( $tag ) { if ( empty( $tag ) ) { return '';
} return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)',
tag_escape( $tag ) );
}/**
* Retrieves a canonical form of the provided charset appropriate for passing to PHP
* functions such as htmlspecialchars() and charset HTML attributes.
*
* @since 3.6.0
* @access private
*
* @see https://core.trac.wordpress.org/ticket/23688
*
* @param string $charset A charset name.
* @return string The canonical form of the charset.
*/