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 can you make a connection with mysql server using php?

517


How many types of session are there?

550


What are computer variables?

538


What is csrf cookie?

493


How to join multiple strings stored in an array into a single string?

521






Which cryptographic extension provide generation and verification of digital signatures?

533


Why do we use interface in php?

544


How to replace a substring in a given string?

563


What is composer install?

597


Is python similar to php?

556


Describe the security vulnerability of PHP?

618


Is php class name case sensitive?

528


How is it possible to set an infinite execution time for php script?

528


Do you know what's the difference between __sleep and __wakeup?

534


What is the difference between fopen() and fclose()?

593