WordPress at a glance
function is not described

_get_wptexturize_shortcode_regex() WP 4.4.0

Retrieve the regular expression for shortcodes.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

String. The regular expression

Usage

_get_wptexturize_shortcode_regex( $tagnames );
$tagnames(string[]) (required)
Array of shortcodes to find.

Changelog

Since 4.4.0 Introduced.

Code of _get_wptexturize_shortcode_regex() WP 5.7.2

<?php
function _get_wptexturize_shortcode_regex( $tagnames ) {
	$tagregexp = implode( '|', array_map( 'preg_quote', $tagnames ) );
	$tagregexp = "(?:$tagregexp)(?=[\\s\\]\\/])"; // Excerpt of get_shortcode_regex().
	// phpcs:disable Squiz.Strings.ConcatenationSpacing.PaddingFound -- don't remove regex indentation
	$regex =
		'\['                // Find start of shortcode.
		. '[\/\[]?'         // Shortcodes may begin with [/ or [[.
		. $tagregexp        // Only match registered shortcodes, because performance.
		. '(?:'
		.     '[^\[\]<>]+'  // Shortcodes do not contain other shortcodes. Quantifier critical.
		. '|'
		.     '<[^\[\]>]*>' // HTML elements permitted. Prevents matching ] before >.
		. ')*+'             // Possessive critical.
		. '\]'              // Find end of shortcode.
		. '\]?';            // Shortcodes may end with ]].
	// phpcs:enable

	return $regex;
}