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 whether it is possible to share a single instance of a memcache between multiple php projects?

1025


How to remove the new line character from the end of a text line in php?

1018


What is dao in php?

1010


What is php beginner?

1029


How to set a page as a home page in a php based site?

982


What is abstract class php?

974


What is get and post method in php?

1056


Does session expire on closing browser?

945


Can we override static method in php?

1140


Do you know what does $globals means?

1097


What is difference Between PHP 5 and 7?

1186


How can I prevent sql-injection in php?

1095


What are the Advantages and Application Areas of PHP?

977


Where are cookies stored php?

956


What is the role of php.ini file?

1033