|
本帖最后由 Tank 于 2018-8-12 16:21 编辑
[ol]"download_url":"https:\/\/down.abc.com\/softs\/201706\/26\/40421\/40421.zip","download":"s2","Url":"https:\/\/down2.abc.com\/softs\/201706\/26\/40421\/40421.zip"}],[/ol]复制代码
我想分別截取到這兩個URL:
https:\/\/down.abc.com\/softs\/201706\/26\/40421\/40421.zip
https:\/\/down2.abc.com\/softs\/201706\/26\/40421\/40421.zip
第一個URL我是這樣寫的:
preg_match("#\"download_url\":\"(.+)\",\"download\":#",$content,$matches
第二個URL我是這樣寫的:
preg_match("#\"download\":\"s2\",\"Url\":\"(.+)\"}#",$content,$matches
結果兩個都獲取不到那個url
可以肯定是我的正則寫錯了,請懂得的前輩指點一下。
|
|