开发者

Regex to get all links to .mp3 files

$regex_pattern = "((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\开发者_如何学C.&]*)";

This code gets all HTTP links but I only need .mp3 links


Simply put \.mp3 at the end.

$regex_pattern = "((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*\.mp3)";


If you only need .mp3 links, then you should only need to check for .mp3, so

$regex_pattern = "\.mp3";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜