All pastes #886369 Raw Edit

Untitled

public text v1 · immutable
#886369 ·published 2008-01-31 16:59 UTC
rendered paste body
$tok = strtok( $inputed, "," );
while ( $tok !== false )
{
  if( eregi( '^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$', trim( $tok ) ) ) {
    $addr = trim($tok);
    /* ...... */
  }
  $tok = strtok( "," );
}

this sometimes correctyl tokenize emails with subdomains like
a@x.foo.com, b@y.foo.com,

but sometimes NOT (on another server) and it matches NOTHING.

wtf?!?!