Bug #17504 Updated: Returning all email addresses found in a string with preg_match_all
| From: | cynic@php.net | Date: | Wed, 29 May 2002 10:15:40 +0000 |
| Subject: | Bug #17504 Updated: Returning all email addresses found in a string with preg_match_all | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-8835@lists.php.net to get a copy of this message | ||
ID: 17504
Updated by: cynic@php.net
Reported By: toby.beresford@ship-uk.com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Linux
PHP Version: 4.2.1
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-05-29 05:49:15] toby.beresford@ship-uk.com
This code searches a string and returns all the email addresses in it.
preg_match_all("(([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4})",$StringToSearch,$matches);
for ($b=0; $b<sizeof($matches[0]); $b++) {
echo $matches[0][$b]."<br>";
}
-toby
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17504&edit=1