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

Explain the visibility of the property or method?

1016


What is empty php?

972


Explain some of the php string functions?

965


How to open a file for writing?

1057


What is ci framework in php?

1007


Tell me how is it possible to remove escape characters from a string?

948


What is the difference between javascript and php?

1026


What are the advantages of php mysql?

965


explain php variable length argument function.

1049


Is polymorphism inherited?

991


What is use of htmlspecialchars php?

1026


Tell me how to strip whitespace (or other characters) from the beginning and end of a string?

965


Define metaphone()?

8700


How to write the form tag correctly for uploading files?

960


How long does a php session last for?

1024