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 are variables in research examples?
Can you extend a final defined class?
What are the characteristics of php variables?
What is the use of preg_match in php?
How to insert a line break in php string?
How to create connection in php?
Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?
How can i execute PHP File using Command Line?
Is laravel frontend or backend?
What is difference between strstr() and stristr()?
What are html entities?
A process can run only in the background. State Whether True or False?
What is the difference between $var and $$var?
Is gender a dependent variable?
Which is correct about mysqli and pdo?