How can we extract string 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP
Answer Posted / rachana
We can use the preg_match() function with "/.*@(.*)$/" as
the regular expression pattern. For example:
preg_match("/.*@(.*)$/","http://info@abc.com",$data);
echo $data[1];
| Is This Answer Correct ? | 49 Yes | 2 No |
Post New Answer View All Answers
What are PHP Magic Methods/Functions. List them.
How do you use end in python?
what is benefit of magento?
What happens when submit button is clicked?
What is the meaning of symbol '$' in jquery?
What is static method php?
What is the difference between session_unregister() and session_unset()?
How to create an array in php?
How to get complete current page url in php?
Tell me what does pear stands for?
Explain how to run the interactive php shell from the command line interface?
Php program to generate fibonacci series?
Is facebook still written in php?
What is isset in php?
Define soundex()?