<?php $word = 'Song'; $string = "some words http://I_like_to_sing.mp3 and then some other words http://Another_song.mp3 and some words at the end..."; $regex = "/(https?:\/\/(?![^.]*$word).+?\.mp3)/i"; preg_match_all($regex, $string, $matches); print_r($matches[1]);
You have javascript disabled. You will not be able to edit any code.