How can we extract string 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP
Answer Posted / gaurav
you can use array split
$site_arr=split("@", "http://info@abc.com");
$site_name=$site_arr[1];
$site_name will have the value abc.com.
| Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
Explain the visibility of the property or method?
What is empty php?
Explain some of the php string functions?
How to open a file for writing?
What is ci framework in php?
Tell me how is it possible to remove escape characters from a string?
What is the difference between javascript and php?
What are the advantages of php mysql?
explain php variable length argument function.
Is polymorphism inherited?
What is use of htmlspecialchars php?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
Define metaphone()?
How to write the form tag correctly for uploading files?
How long does a php session last for?