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 how the result set of mysql be handled in php?
What does $globals mean?
What is mean by an associative array?
How do I debug php?
What is the basic syntax of Php?
> symbol is used to redirect the output of a command. State Whether True or False?
How can php and html interact?
Explain Booleans in PHP?
What is the difference between query and question?
How to create an array from php string?
Tell me what is mean by an associative array?
How to get the value of current session id?
What is difference between strstr() and stristr()?
Is php 5 still supported?
How do you find the length of a string in php?