I have a html file that contains urls that start with ftps, http, https, mms, ed2k.. and in certain paragraphs. I need to sort these links and remove all the links that start with mms://. I tried preg_replace but it doesnt work coz many links are too long. can someone suggest a good method to remove the links using php?
A:
I didn't understand why preg_replace didn't work, length should not be an issue.
Try this
preg_replace("/mms:\/\/(.*?)\s/is", "", $string);
marvin
2010-03-11 11:45:50
I did a small mistake in the regex.. works fine now.. thanks :D
LiveEn
2010-03-11 11:55:04