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
What is split function in php?
What are the ways to include file in php?
What are differences between PECL and PEAR?
Which function(s) in PHP computes the difference of arrays?
Is gender a dependent variable?
Why php is used?
Explain preg_Match and preg_replace?
for image work which library?
When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?
What should we do to be able to export data into an excel file?
Is php free to use?
For image work which library is used in php?
What is oops php?
Can you pass an array into a function?
What software is required for php?