How can we extract string 'techinterviews.com' from a string
'http://www.techinterviews.com' using regular expression in PHP?
Answer Posted / 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 |
Post New Answer View All Answers
How do I stop php artisan serve in windows?
What does the initials of php stand for?
What is the use of php and mysql?
What is html used for?
What is instantiation?
Is wordpress a php framework?
Is php used for frontend or backend?
Differences between get, post and request methods ?
What are global variables in php?
What is __ construct in php?
What is use of in_array() function in php?
What is php good for?
How long should a session last?
What is the best way to test the strpos() return value in php?
Is rent a variable cost?