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 'techinterviews.com' from a string
'http://www.techinterviews.com' using regular expression in PHP?

Answers were Sorted based on User's Feedback



How can we extract string 'techinterviews.com' from a string 'http://www.techintervi..

Answer / rajeev raj karn

$url="http://www.techinterviews.com";
$url_part=split("w{1,3}[\.]",$url);
echo $url_part[1];

Is This Answer Correct ?    3 Yes 0 No

How can we extract string 'techinterviews.com' from a string 'http://www.techintervi..

Answer / ram

$url = "http://www.techinterviews.com";
$splittedstring = explode ("www.",$url );
$str = $splittedstring[1];
echo $str ;

Is This Answer Correct ?    0 Yes 0 No

How can we extract string 'techinterviews.com' from a string 'http://www.techintervi..

Answer / sunil kumar

echo
strstr("http://www.techinterviews.com","techinterviews.com");

Is This Answer Correct ?    8 Yes 9 No

How can we extract string 'techinterviews.com' from a string 'http://www.techintervi..

Answer / brett

echo str_ireplace('http://www.','',$url);

Is This Answer Correct ?    3 Yes 8 No

Post New Answer

More PHP Interview Questions

How do I stop php artisan serve in windows?

0 Answers  


What are the disadvantages of php?

0 Answers  


Is time a dependent variable?

0 Answers  


What is namespaces in PHP?

0 Answers  


What is env in laravel?

0 Answers  


how can i disable multiple user in the same password in my website using any scripts

1 Answers  


how to open & closing opening period in fico

0 Answers   NS,


What does trim () do in javascript?

0 Answers  


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

0 Answers  


Describe the differences between the object models in PHP 4 and PHP 5.

1 Answers  


i have designed a registration form in html (registration.html) and to insert user details in database i have designed a submit form in php (submit_registration.php) but when i click on submit button in registration.html it opens a dialogue box which asks for open or save php(submit_registration.php) even though i have already installed apache HTTP server and php version 5 on my computer and i am using mysql as backend. plz suggest me what should i do????

3 Answers  


What is the difference between get and post in php?

0 Answers  


Categories