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 to make database connection in php?
What are the differences between GET and POST methods?
Where php language is used?
What is new static in php?
How to get length of an array in PHP?
Tell me what are the different types of errors in php?
Which is better php or wordpress?
Write syntax to open a file in php?
Is jquery better than javascript?
When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?
What are php data types?
Tell me are parent constructors called implicitly inside a class constructor?
What's the best method for sanitizing user input with php?
How can we access the data sent through the url with the post method?
Why echo is faster than print in php?