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 outdated 2019?

956


What is ci in php?

1061


what is variable scope, which variables are accessible from where and what are "undefined variable" errors?

1097


Is strcmp case sensitive?

970


What are php magic methods/functions?

1009


What is the php function that removes the first element of the array and returns it?

977


What is the major php security hole? How to avoid?

997


Why php 7 is faster?

974


Tell me is it possible to remove the html tags from data?

905


What are the differences between GET and POST methods in form submitting?

1052


What is cookie and why do we use it?

990


What is var_dump function in php?

1105


Which is better mysql or sql?

1016


What is php and its uses?

976


Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?

951