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 arrays are passed through arguments?

1066


What is meant by ‘passing the variable by value and reference' in php?

1004


What are the uses of php language?

974


What is difference between action hook and filter hook?

885


Is string php function?

1071


What are session variables in php?

1032


Can we use get instead of post?

969


How to check if a string contains a character or word in php?

1008


Is php easier than javascript?

993


What is the difference between print() and echo()?

1040


What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?

990


What are the 3 types of sessions?

1069


What are the methods of array in java?

954


How to create a session? How to set a value in session?

986


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

987