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 / vipul dalwala

$string = "http://info@allinterview.com";
preg_match(@^(?:http://)?([^@]+)(.*)$@i', $string,
$matches);

print $matches[2]; // allinterview.com

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me how the result set of mysql be handled in php?

970


What does $globals mean?

938


What is mean by an associative array?

1047


How do I debug php?

928


What is the basic syntax of Php?

1119


> symbol is used to redirect the output of a command. State Whether True or False?

1139


How can php and html interact?

1035


Explain Booleans in PHP?

1068


What is the difference between query and question?

946


How to create an array from php string?

1023


Tell me what is mean by an associative array?

1060


How to get the value of current session id?

946


What is difference between strstr() and stristr()?

1042


Is php 5 still supported?

972


How do you find the length of a string in php?

963