Onbekend |
|
Er zat een foutje in. Heb het even aangepast:
<?php
$string = "<song path=\"G://Dj_Rimi_-_Multimix_0005_-_Party_Vol_2.mp3\" title=\"Dj_Rimi_-_Multimix_0005_-_Party_Vol_2.mp3\" />";
$string = preg_replace("#<song path=\".*?\" title=\"(.*?)\" />#si", "\\1", $string);//ik was hier ' /' vergeten
echo $string; //output: Dj_Rimi_-_Multimix_0005_-_Party_Vol_2.mp3
?>
<?php $string = "<song path=\"G://Dj_Rimi_-_Multimix_0005_-_Party_Vol_2.mp3\" title=\"Dj_Rimi_-_Multimix_0005_-_Party_Vol_2.mp3\" />"; $string = preg_replace("#<song path=\".*?\" title=\"(.*?)\" />#si", "\\1", $string);//ik was hier ' /' vergeten echo $string; //output: Dj_Rimi_-_Multimix_0005_-_Party_Vol_2.mp3 ?>
|