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

How to remove blank spaces from the string?

722


A process can run only in the background. State Whether True or False?

836


What is filter_var?

707


What is return value in php?

698


What is orm in php framework?

742


When to use inquire vs enquire?

725


What are the new features in php 7?

726


Is php used for frontend or backend?

730


How to set session.gc_maxlifetime properly?

772


How do you check if a variable has been set in php?

719


What is the difference between Split and Explode in PHP?

797


What is php? Why it is used?

757


Tell me what is the difference between exception::getmessage and exception::getline?

693


List some array functions in php?

693


How can we create a database using php?

807