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

Answer Posted / navneet singh

$url = "http://info@abc.com"
$domain = strstr($url,"@");
echo $domain

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between __sleep and __wakeup?

554


What is the use of php and mysql?

562


What is the difference between the functions strstr() and stristr()?

550


What are differences between PECL and PEAR?

520


What is return in php function?

508






What are the differences between mysqli_connect and mysqli_pconnect?

541


Explain me is multiple inheritance supported in php?

537


Which programming language does php resemble to?

551


Which array function checks if the particular key exists in the array?

504


my english is not too good then what we apply for a php programer post

2026


When do sessions end?

548


Can I include php in javascript?

604


Why constructor is not overridden?

546


Which is true about the singleton design pattern?

557


How many data types are used by php?

517