3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "i want to show you my youtube channel : [youtube id=12341234] and my instagram account : [instagram id=myingaccount213]"; preg_match_all("~\h*(.*?\[[^][]*])~", $s, $matches); print_r($matches[1]);

preferences:
34.73 ms | 405 KiB | 5 Q