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

What's the difference between accessing a class method via -> and via ::?

744


Can we embedded directly PHP code into XHTML document? State Whether True or False?

1505


What are php magic methods?

719


What is data abstraction in php?

771


What is framework in php?

725


List few sensible functions in PHP?

751


Is php session id unique?

715


Why do we use htaccess

811


Tell me what are the __construct() and __destruct() methods in a php class?

731


Which framework is best for php?

722


Which is correct about mysqli and pdo?

780


Is it easy to learn wordpress?

734


How to insert an new array element in array?

763


What is a variable cost example?

744


What is difference between action hook and filter hook?

657