E
x
c
e
l
P
T
P

How can we extract string ‘abc.com ‘ from a string ‘http://info@abc.com’ using regular expression of PHP?

March 4, 2014

preg_match(“/^http:\/\/.+@(.+)$/”,’http://info@abc.com’,$found);
echo $found[1];