From: [EMAIL PROTECTED]
Operating system: Linux
PHP version: 4.2.1
PHP Bug Type: Documentation problem
Bug description: Returning all email addresses found in a string with preg_match_all
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 bug report at http://bugs.php.net/?id=17504&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17504&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17504&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17504&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17504&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17504&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17504&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17504&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17504&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17504&r=globals