Scarecrow adlı üyeden alıntı: mesajı görüntüle
Evet, bu şekilde olacak

$var = preg_replace_callback('/<figure\s*class="media">\s*<oembed\s*url="(https:\/\/www\.(?:instagram.com)\/p\/[a-zA-Z0-9_-]+)\/"><\/oembed>\s*<\/figure>/', function($matches) {
    return $matches[1];
}, $text);
Süpersin ya çok sağol.