我在我的代码中有以下URL,我想将其拆分并从中获取数字。
例如,从下面的URL中需要获取123456。
例如,从下面的URL中需要获取123456。
https://review-test.com/#/c/123456/
我已经尝试过这个,但它没有起作用。
$completeURL = https://review-test.com/#/c/123456/ ;
list($url, $number) = explode('#c', preg_replace('/^.*\/+/', '', $completeURL));