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

Will react hooks replace redux?

965


Tell me how to create a text file in php?

986


How to specify argument default values?

976


How do you put a space in html?

997


What are Routines?

2225


Does wordpress run on php 7?

967


Who is the father of php and what is the current version of php and mysql?

1322


Tell us how to create an array of a group of items inside an html form?

978


Is polymorphism inherited?

997


How do you end php?

977


What types of Data Can Be Used as Array Keys?

1023


What is a php namespace?

965


What is strcmp?

951


How to track no of user logged in?

1019


What is input sanitization in php?

970