Hi all,
I have been trying to remove the URLS with http://www.CHickenHead.com that have areguments ?s= and ?sul= fromt some text. I can remove them but it is not case insensitive on the domain name part.
How can I modify this regex? I have tried (chickenHead.com)i but this doesen't work.
As you may guess I am not a computer science / regex type.
$text = "1asda <BR> http://www.foo.bar <BR> http://www.chickenHead.com <BR> http://www.CHickenHead.com?s=234234 <BR> http://www.cHickenHEad.com?sul=2QWR34 <BR> wtweghjio <BR> http://www.zitty.foo <BR> test";
$reg = "(([a-zA-Z]+://)+". //find xxx://
"([a-zA-Z]+.)+". //www.
"(chickenHead.com)+". //chickenHead.com
"([^\s]+))"; //until space is reached
$linktext = preg_replace($reg, "", $text);
echo $linktext."<BR>";