get_shortcode_atts_regex()
Retrieves the shortcode attributes regex.
No Hooks.
Return
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.5.2
function get_shortcode_atts_regex() { return '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|\'([^\']*)\'(?:\s|$)|(\S+)(?:\s|$)/'; }