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

Answer Posted / sathya

Use this coding

$variablename="http://info@abc.com";
$u=explode("@",$variablename);
$u2=$u[1];

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute a function in php?

457


Write a program to display table of a number using php?

496


Explain setcookie() function in php?

563


Write syntax to open a file in php?

520


What are session variables in php?

525






What is isset in php?

530


What is the use of stripslashes in php?

538


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

593


What is the use of 'print' in php?

548


What is printf in php?

527


What is difference between single quotes and double quotes in php?

490


What is the difference between exception::getmessage and exception::getline?

535


How to assigning a new character in a string using php?

544


How does php strcmp work?

507


Can php run on windows server?

527