$addresses = array();
/* Find all the email addresses in the body */
- while(eregi($Email_RegExp_Match, $sbody, $regs)) {
+ while (preg_match('/' . $Email_RegExp_Match . '/i', $sbody, $regs)) {
$addresses[$regs[0]] = strtr($regs[0], array('&' => '&'));
$start = strpos($sbody, $regs[0]) + strlen($regs[0]);
$sbody = substr($sbody, $start);
$url = substr($body, $target_pos, $end-$target_pos);
/* Needed since lines are not passed with \n or \r */
- while ( ereg("[,\.]$", $url) ) {
+ while ( preg_match('/[,.]$/', $url) ) {
$url = substr( $url, 0, -1 );
$end--;
}
$addresses = array();
/* Find all the email addresses in the body */
- while (eregi($Email_RegExp_Match, $string, $regs)) {
+ while (preg_match('/' . $Email_RegExp_Match . '/i', $string, $regs)) {
$addresses[$regs[0]] = strtr($regs[0], array('&' => '&'));
$start = strpos($string, $regs[0]) + strlen($regs[0]);
$string = substr($string, $start);