Mantis - Quercus
Viewing Issue Advanced Details
3463 minor always 04-28-09 06:48 04-28-09 06:48
pablorg  
 
normal  
new 3.2.1  
open  
none    
none  
0003463: regex error
this code works in PHP but not Quercus:

function isValidEmail(&$value){
    $atom = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; // allowed characters for part before "at" character
    $domain = '([a-z]([-a-z0-9]*[a-z0-9]+)?)'; // allowed characters for part after "at" character
    $email = $atom . '+' . // One or more atom characters.
        '(\.' . $atom . '+)*'. // Followed by zero or more dot separated sets of one or more atom characters.
        '@'. // Followed by an "at" character.
        '(' . $domain . '{1,63}\.)+'. // Followed by one or max 63 domain characters (dot separated).
        $domain . '{2,63}'; // or max 63 domain characters.
    $pattern = '^('.$email.'[,]{0,1}){1,5}$';
    return ereg($pattern,$value);
}

There are no notes attached to this issue.