Saturday 25 February 2012

How can we extract string "pcds.co.in " from a string "http://info@pcds.co.in using regular expression of PHP?


preg_match("/^http:\/\/.+@(.+)$/","http://info@pcds.co.in",$matches);
echo $matches[1];