get_shortcode_atts_regex()
Retrieves the shortcode attributes regex.
No Hooks.
Returns
String. The shortcode attribute regular expression.
Usage
get_shortcode_atts_regex();
Changelog
| Since 4.4.0 | Introduced. |
get_shortcode_atts_regex() get shortcode atts regex code WP 6.9.1
function get_shortcode_atts_regex() {
return '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|\'([^\']*)\'(?:\s|$)|(\S+)(?:\s|$)/';
}