get_shortcode_atts_regex

Retrieve the shortcode attributes regex.

Description

(string) get_shortcode_atts_regex(); 

Returns (string)

The shortcode attribute regular expression


Usage

  1. if ( !function_exists( 'get_shortcode_atts_regex' ) ) { 
  2. require_once ABSPATH . WPINC . '/shortcodes.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_shortcode_atts_regex(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/shortcodes.php  
  1. function get_shortcode_atts_regex() { 
  2. return '/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*\'([^\']*)\'(?:\s|$)|([\w-]+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';