Regex Instagram for Embed : How to Embed Instagram URLs in $text?

    $text = It was 'https://www.instagram.com/p/Bes0orNjOIa/?taken-by=kendalljenner, then it was https://www.instagram.com/p/BfL4X3-lcst/?taken-by=kendalljenner';

Result

    echo $text;
    // It was <iframe src="//www.instagram.com/p/Bes0orNjOIa/embed"></iframe>, then it was <iframe src="//www.instagram.com/p/BfL4X3-lcst/embed"></iframe>