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

What is the meaning of "enctype= multipart/form-data" ?

1125


How to get ip address of clients machine?

981


List some sorting functions in php?

962


How can I find my php version?

1012


What is a composer?

968


What is the output of the following php code?

937


Explain $_FILES Superglobal Array?

1042


Why do we use htaccess

1070


What is uniqid php?

1063


Which function(s) in PHP computes the difference of arrays?

986


Can you use both this () and super () in a constructor?

1008


How to pass an argument to a function?

1227


How is the comparison of objects done in php?

934


What is form submission?

992


How to copy a file?

1073