How can we extract string ?allinterview.com ? from a string
?http://info@allinterview.com? using regular expression of PHP?
Answer Posted / raj
$text = "http://info@allinterview.com";
preg_match('|.*@([^?]*)|', $text, $output);
echo $output[1];
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How long is a php session valid?
When sessions ends?
Write a php script to get the largest key in an array?
What is $_ server request_method == post?
What is php session_start() and session_destroy() function?
What are session variables in php?
What is difference between web service and api?
What is array and function?
What is ltrim?
Is ruby on rails php?
What is the use of die in php?
What are the features of object-oriented programming in php?
What is difference between require_once(), require(), include()?
What is class extend in php?
Explain me how failures in execution are handled with include() and require() functions?