How can we extract string ?allinterview.com ? from a string
?http://info@allinterview.com? using regular expression of PHP?
Answer Posted / vipul dalwala
$string = "http://info@allinterview.com";
preg_match(@^(?:http://)?([^@]+)(.*)$@i', $string,
$matches);
print $matches[2]; // allinterview.com
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Tell me what is the default session time in php?
A process is identified by a unique___
Write a program to find no of days between two dates in php?
Tell me what library is used for pdf in php?
What exactly is PHP?
What is the meaning of a final class and a final method?
What is the use of php and mysql?
Is empty array php?
Does php support overloading?
How to calculate the difference between two dates using php?
What is php form validation?
Tell me what is the main difference between require() and require_once()?
What are php libraries?
What is cookie and why do we use it?
What is the difference between Split and Explode in PHP?