Languages: English • Reference/get tag regex 日本語 (Add your language)
Returns Regular Expression to liberally match 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
<?php ?>
Description text
Example code
get_tag_regex() is located in wp-includes/functions.php
.
Function ref links