3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'http://weibo.com/1948452141/BAlOHzDS3?ref=home&rid=7_0_2598638016537367410'; $pattern = "/.*weibo.com\/\d+\/(\w+)\?.*/"; preg_match_all($pattern, $url, $arr); print_r($arr);
based on fDQBG
Output for 4.3.0 - 7.2.0
Array ( [0] => Array ( [0] => http://weibo.com/1948452141/BAlOHzDS3?ref=home&rid=7_0_2598638016537367410 ) [1] => Array ( [0] => BAlOHzDS3 ) )