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 can we check the value of a given variable is a number?
What is meant by urlencode and urldecode?
What is the difference between require and include in php?
What are the uses of explode() and implode() functions?
What is php constructor?
Why is overriding runtime?
What are the differences between require and include?
What are global variables in php?
What is difference between static and constant in php?
How to use http headers inside php?
Who is the father of php and what is the current version of php and mysql?
What is difference between explode() or split() in PHP?
Tell me what does pear stands for?
explain php variable length argument function.
How is session data stored?