我从YouTube API的preg_match()从YouTube API获取数据
<content type='text'>
Song: Haske
Music: Atul Sharma
Lyrics: Pargat Singh
Singer: Harjeet Harman
Music On : T-Series
For latest Punjabi Music Subscribe
http://www.youtube.com/tseriesapnapunjab
http://www.facebook.com/tseriesapnapunjab
</content>
我想这些领域不与的preg_match()字段需要的歌曲:,音乐:,歌词:,歌手写一些文字:我怎样才能得到这一点(我不全部细节刚需必填项)......我是新来的preg_match(),请帮助
编辑
我是想这一点,但不没有如何得到它的工作与我的需要
$string = "/brown fox jumped [0-9]/";
$paragraph = "The brown fox jumped 1 time over the fence. The green fox did not. Then the brown fox jumped 2 times over the fence";
if (preg_match_all($string, $paragraph, &$matches)) {
foreach($matches[0] as $a){
echo $a;
}
更改'$ string =“/ brown fox jump [0-9] /”;'to'$ string =“/ brown fox jumped([0-9] )+ /“;' – reikyoushin 2013-05-03 14:14:11