<?php $string = "The text you want to filter goes here. http://google.com, https://www.youtube.com/watch?v=K_m7NEDMrV0,https://instagram.com/hellow/"; $ns = preg_replace_callback( '#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', function($match) { // print_r($match); return md5($match[0]); }, $string ); print_r($ns);
You have javascript disabled. You will not be able to edit any code.