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 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP

Answer Posted / gaurav

you can use array split
$site_arr=split("@", "http://info@abc.com");
$site_name=$site_arr[1];

$site_name will have the value abc.com.

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to break a file path name into parts?

975


What is a persistent cookie in php?

981


What are computer variables?

943


How do I find environment variables?

999


What are php filters?

959


What is the difference between for and foreach loop in php?

1091


Is php closing tag necessary?

1004


How easy is php?

945


What is mean by an associative array?

1067


Explain the difference between mysql_connect and mysql_pconnect?

914


What is array filter in php?

960


Is php secure?

970


What is the difference between explode () and split () functions in php?

1121


How to pass an argument to a function?

1221


How to split a string into array using php?

1168