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 ?allinterview.com ? from a string
?http://info@allinterview.com? using regular expression of PHP?

Answer Posted / raj

$text = "http://info@allinterview.com";
preg_match('|.*@([^?]*)|', $text, $output);
echo $output[1];

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long is a php session valid?

1000


When sessions ends?

937


Write a php script to get the largest key in an array?

1012


What is $_ server request_method == post?

1052


What is php session_start() and session_destroy() function?

1026


What are session variables in php?

1003


What is difference between web service and api?

1015


What is array and function?

1031


What is ltrim?

901


Is ruby on rails php?

948


What is the use of die in php?

966


What are the features of object-oriented programming in php?

900


What is difference between require_once(), require(), include()?

982


What is class extend in php?

1029


Explain me how failures in execution are handled with include() and require() functions?

1003