3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match_all( '#\[(link)(.*?)!?\](.*?)\[\/\\1\]#i', '[link href="http://www.google.com" title="Google" target="_blank"]Google[/link][link href="http://www.facebook.com"]Facebook[/link] [link href=\'http://www.twitter.com\' rel="nofollow"]Twitter[/link]', $StrMatches ); /* $StrMatches[0] = Full tag string * $StrMatches[1] = Tag name * $StrMatches[2] = tag params string * $StrMatches[3] = Tag content * */ print_r($StrMatches);

preferences:
40.08 ms | 402 KiB | 5 Q