diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php
index 55e64a1..3ed33b2 100644
--- a/src/wp-includes/shortcodes.php
+++ b/src/wp-includes/shortcodes.php
@@ -176,6 +176,32 @@ function has_shortcode( $content, $tag ) {
 }
 
 /**
+ * Search content for shortcodes and return them.
+ *
+ * @param  string       $content  Content to search for shortcodes.
+ * @param  string|array $tagnames Tagnames to search for. If false, will search all.
+ * @return false|array Array of shortcodes found.
+ */
+function get_shortcodes( $content, $tagnames = false ) {
+	if ( is_string( $tagnames ) ) {
+		$tagnames = array( $tagnames );
+	}
+	preg_match_all( '/' . get_shortcode_regex( $tagnames ) . '/s', $content, $matches, PREG_SET_ORDER );
+
+	if ( empty( $matches ) )
+		return false;
+
+	$found_shortcodes = array();
+	foreach ( $matches as $shortcode ) {
+		$found_shortcodes[] = array(
+			'tag' => $shortcode[2],
+			'atts' => shortcode_parse_atts( $shortcode[3] )
+		);
+	}
+	return $found_shortcodes;
+}
+
+/**
  * Search content for shortcodes and filter shortcodes through their hooks.
  *
  * If there are no shortcode tags defined, then the content will be returned
@@ -221,13 +247,14 @@ function do_shortcode($content) {
  *
  * @since 2.5.0
  *
- * @uses $shortcode_tags
- *
- * @return string The shortcode search regular expression
+ * @param  array $tagnames Specific tags to build the regex for.
+ * @return string          The shortcode search regular expression.
  */
-function get_shortcode_regex() {
+function get_shortcode_regex( $tagnames = '' ) {
 	global $shortcode_tags;
-	$tagnames = array_keys($shortcode_tags);
+	if ( empty( $tagnames ) ) {
+		$tagnames = array_keys( $shortcode_tags );
+	}
 	$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
 
 	// WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
