simple regular expression to search all the emails from a web page.
| April 12, 2010 | Posted by Subikar under email, link, php |
Hi Developers If you want to search all the emails from a web page you can use this simple regular expression to search all the email from any website.
(href=["|\'])(mailto:)(.*?)(["|\'])
If you are using php script then your code will be like this.
preg_match(‘(href=["|\'])(mailto:)(.*?)(["|\'])’, $Your String, $Return the data in Array);