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 / rajan vardawaj

We can use the preg_match() function with “/.*@(.*)$/” as
the regular expression pattern. For example:
preg_match(”/.*@(.*)$/”,”info@abc.com”,$data"
target="_blank">http://info@abc.com”,$data); echo $data[1];

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of triggers in php?

872


Is salary fixed or variable cost?

952


How do I install php?

1028


What is 'float' property in css?

955


I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?

895


Does strlen include null?

1027


What is member variable?

923


Explain what is the difference between $var and $$var?

950


List some features of php that are deprecated in php

888


What is difference between post and put in rest?

962


Which php framework is best for web development?

920


What is cURL in PHP?

954


What is the use of callback in php?

945


What is list in PHP?

1071


What is mysql in php?

893