How can we extract string ‘abc.com ‘ from a string
info@abc.com" target="_blank">http://info@abc.com using
regular expression of php?
Answer Posted / rajan vardawaj
We can use the preg_match() function with “/.*@(.*)$/” as
the regular expression pattern. For example:
preg_match(”/.*@(.*)$/”,”info@abc.com”,$data"
target="_blank">http://info@abc.com”,$data); echo $data[1];
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
How to get useful error messages in php?
Are static variables final?
How should a model be structured in mvc?
What are major variables in research?
Define urlencode() and urldecode() used in php?
Explain different sorting function in php?
How does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
write a note on Testing the web site
What is get and post method in php?
Explain me what is the use of 'print' in php?
which will print out the php call stack?
Do while loops php?
How php statement is different from php script?
Explain the difference between mysql_connect and mysql_pconnect?
What are the characteristics of php variables?