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

Explain different sorting function in php?

596


What is x+ mode in fopen() used for?

553


What is htaccess in php?

603


Which will start a session?

572


What is $_session in php?

536






What is a php tag?

515


What are the method available in form submitting?

521


Explain Constant in Class?

558


I am writing an application in php that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with php?

506


How escape single quotes php?

474


What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?

615


What is php full form?

547


What is final class and final method?

565


Is server side a session?

489


What is an object in php?

543