Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we extract string ?allinterview.com ? from a string
?http://info@allinterview.com? using regular expression of PHP?

Answer Posted / raj

$text = "http://info@allinterview.com";
preg_match('|.*@([^?]*)|', $text, $output);
echo $output[1];

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where is session id stored?

916


What is session expiry?

897


What is include in php?

894


How to convert numbers to strings in php?

948


How is it possible to know the number of rows returned in result set?

946


What is the major php security hole? How to avoid?

935


Is session a cookie?

923


Explain how to run the interactive php shell from the command line interface?

1015


What is mysql_fetch_object?

986


What is $_ get?

918


What are the common uses of php?

1033


What is final class and final method?

1002


How does php isset work?

887


What is stripslashes php?

916


How does php strcmp work?

997