get_tag_regex


get_tag_regex ( $tag )

Parameters:
  • (string) tag An HTML tag name. Example: 'video'.
Returns:
  • (string) Tag RegEx.
Defined at:

Description

Returns RegEx body to liberally match an opening HTML tag.Matches an opening HTML tag that: 1. Is self-closing or 2. Has no body but has a closing tag of the same name or 3. Contains a body and a closing tag of the same name Note: this RegEx does not balance inner tags and does not attempt to produce valid HTML

Related Functions

get_tag, get_shortcode_regex, get_tag_template, get_html_split_regex, get_page

Top Google Results

User discussions

wpseek mobile