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 ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of trim function in php?

735


What are psrs? Choose 1 and briefly describe it?

1166


Suppose your zend engine supports the mode Then how can you configure your php zend engine to support Mode ?

771


What is the use of magic function in php?

716


What is phpsessid?

724


What is the importance of "method" attribute in a html form?

793


What is the function of string in c?

772


What language is php based on?

698


What is a static variable in php?

792


Is php a programming language?

791


How will you calculate days between two dates in PHP?

804


Tell me which programming language does php resemble to?

712


What is meant by MIME?

829


Tell me how to find the position of the first occurrence of a substring in a string?

744


How many data types are there in php?

854