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

Is PHP an open source software?

1053


Does php have a future?

928


How to include variables in double-quoted strings?

968


What is the best way to change the key without changing the value of a php array element?

959


How can you tell if a number is even or odd without using any condition or loop?

992


Write a select query that will be displayed the duplicated site name and how many times it is duplicated?

1009


Explain about the $_GET variable of PHP?

1006


How do you trim spaces in excel?

1016


What is the use of strip_tags() method?

931


What is difference between base_url and site_url?

1007


Why sessions are used in php?

948


Do you know design patterns. List few?

978


What is session and Cokkies . How it works . tell some thing about Session_id()

1937


How to download and install php for windows?

1030


Explain the difference between mysql_connect and mysql_pconnect?

907