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?

Answers were Sorted based on User's Feedback



How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using re..

Answer / pinky

if (ereg("allinterview.com",
"http://info@allinterview.com", $temp) )

print $temp[0];

Is This Answer Correct ?    4 Yes 1 No

How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using re..

Answer / vipul dalwala

$string = "http://info@allinterview.com";
preg_match(@^(?:http://)?([^@]+)(.*)$@i', $string,
$matches);

print $matches[2]; // allinterview.com

Is This Answer Correct ?    3 Yes 2 No

How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using re..

Answer / raj

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

Is This Answer Correct ?    1 Yes 0 No

How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using re..

Answer / kichu

Using explode function

Is This Answer Correct ?    1 Yes 4 No

How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using re..

Answer / jcb.chl

<?
$str = substr('http://info@allinterview.com?',12);
echo $str;
?>

output:

allinterview.com?

Is This Answer Correct ?    2 Yes 6 No

How can we extract string ?allinterview.com ? from a string ?http://info@allinterview.com? using re..

Answer / iiiiiiii

iiiiiiii

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More PHP Interview Questions

When to use inquire vs enquire?

0 Answers  


Explain how can php and javascript interact?

0 Answers  


What is php simple definition?

0 Answers  


What is php explain?

0 Answers  


Explain what is smarty?

0 Answers  


How to generate pdf file in php?

1 Answers  


What is the difference between get and post in php?

0 Answers  


What is nginx and what is it used for?

0 Answers  


Why do we use polymorphism in php?

0 Answers  


Explain how you can update memcached when you make changes to php?

0 Answers  


What is namespaces in PHP?

0 Answers  


Is apache needed for php?

0 Answers  


Categories