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
info@abc.com" target="_blank">http://info@abc.com using
regular expression of php?

Answer Posted / ankush prasad

<?php
$string1="info@abc.com";
$string2=preg_match("/[a-c]+.[c-o]+/",$string1,$a);
print $a[0];
?>

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main difference between require() and include()?

900


What is $_ get in php?

970


How to move uploaded files to permanent directory?

899


How to remove duplicate values from php array?

1051


Is php a backend?

917


How does php serialize work?

969


What is the difference between get and post method in php?

899


Explain how is it possible to set an infinite execution time for php script?

925


How can we encrypt the password using php?

1033


Tell me what is pear?

953


Why and where do we use htaccess?

979


What is singleton design pattern in php?

926


Is polymorphism inherited?

944


What is the best way to avoid email sent through php getting into the spam folder?

947


Why do we use htaccess and where?

959