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
What is rtrim php?
What library is used for pdf in php?
What is php mainly used for?
What is array filter php?
How does session work in php?
What is the difference between php and core php?
what is the scope of php in the future if any other language is developed then may be php is loss ???
Steps for the payment gateway processing?
Is php front end?
How to execute an sql query? How to fetch its result?
How to know user has read the email-php?
What are the functions used in php?
Can you define an array argument as a reference type?
How can we pass the variable through the navigation between the pages?
Explain the importance of the function htmlentities.