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

Answer Posted / sameer joshi

You can do like $site_array=explod("@","http://info@abc.com");
$site_addr=$sitr_array[1];

$site_addr will get the value as abc.com

Is This Answer Correct ?    13 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which framework is best for php?

510


What is polymorphism?

2070


Which function can be used to exit from the script after displaying the error message?

525


Is null check in php?

528


Explain how is it possible to cast types in php?

539






How are cookies created?

551


How to turn on the session support?

576


List the different types of print functions available in php?

555


Php being an open source is there any support available to it?

555


How big is nvarchar max?

575


What is laracast?

586


What is php static function?

542


How can you get the size of an image in PHP?

548


How to write in a file in php?

537


Which function is used to strip whitespace?

444