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

Answer Posted / nitesh kumar

you can use explode funciton

echo $site_array=end(explode("@","http://info@abc.com"));

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between for and foreach loop in php?

628


Write a program to find a string is palindrome or not?

526


What should we do to be able to export data into an excel file?

524


Which software is used to run php programs?

529


What is the most common http method?

527






Write a program to get second highest number in an array using php?

536


How to change the principal password?

629


How to remove the new line character from the end of a text line?

518


What websites use php?

523


What is the use of post in php?

510


How failures in execution are handled with include() and require() functions?

595


What are psrs? Choose 1 and briefly describe it?

952


What is the use of strip_tags() method?

562


Tell me how do I check if a given variable is empty?

543


Does wordpress still use php?

531