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

how to track no of users logged in?

1055


How to open a file for reading?

1073


What is session management php?

1124


Php program to generate fibonacci series?

1104


Is it possible multiple inheritance in php?

1076


What is use of preg_replace in php?

1109


Can I run php without xampp?

1076


Is null in php?

978


How send email using php?

1007


What is the difference between overloading and overriding in php?

1073


I need to know about the courses which are useful in corporate companies.. especially php/mySQL, Java/j2ee, .NET.. also tell if any other courses are valuable

1974


How can php and html interact?

1095


Write a php function to convert all null values to blank?

1379


Why session is required?

988


Which is the best php framework for a beginner?

1048