我有一些来自 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;
}