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 / supriya

$str1="info@abc.com";
$str1=explode("@",$str1);
print_r($str1);

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain do you use composer? If yes, what benefits have you found in it?

548


What the difference between the 'bitwise and' operator and the 'logical and' operator?

525


What is the use of count() function in php?

530


What is different types of visibility?

539


What is trim function in php?

619






How is session data stored?

498


How to calculate the difference between two dates using php?

547


What does explode do in php?

558


What is preg_match?

544


Whether it is possible to share a single instance of a memcache between multiple php projects?

536


Tell us what is the difference between session_unregister() and session_unset()?

559


What is the difference between explode () and split () functions in php?

616


How to concatenate two strings together in php?

566


What version of php do I have windows?

490


What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?

539