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

What are differences between PECL and PEAR?

997


What does the unset() function mean?

1016


What is $_ server request_method == post?

1036


What is the role of php.ini file?

950


How can we access the data sent through the url with the get method?

1137


Explain me what is the use of header() function in php?

995


Which php function will attach one file to another?

941


What are php strings?

933


What does it mean when it says the csrf token is invalid?

859


How to check an element is exists in array or not in php?

1018


What is the difference between $argv and $argc? Give example?

923


What is strlen function in php?

982


Write syntax to open a file in php?

1004


Does exist in php?

946


Do you know what is the differences between $a != $B and $a !== $B?

953