How can we extract string ‘abc.com ‘ from a string
info@abc.com" target="_blank">http://info@abc.com using
regular expression of php?

Answer Posted / simlu_irtt

$string1="info@abc.com";
$string2=split("@",$string1);
print_r($string2);

this code print the string as abc.com

Is This Answer Correct ?    23 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are the best start and end tags to use?

769


Explain the value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of the integers contained inside input?

768


What is an object in php?

745


Why php is used?

828


What is composer install?

794


How many types of functions are there in php?

795


What is the difference between die () and exit () in php?

705


Is empty array php?

727


What do you use php for?

693


Describe which programming language does php parallel to?

692


What is htaccess? Why do we use this and where?

710


What is the use of hooks?

727


What are php variables?

719


How to Pass JSON Data in a URL using CURL in PHP?

754


What is $this in php?

729