More information about the Underscore mailing list

[_] actually not regex, php help needed...

s'unya sunya.dickman at gmail.com
Thu Mar 20 15:11:08 GMT 2008

I did more testing and discovered that my regex actually outputs true, but
an if statement appears to be both true and false...

CODE:
$ftest=(ereg("^[^@]{1,64}@[^@]{1,255}$", $email))?1:0;// to force 0 when
false
        if($ftest <1){
            //return false;
            print("no email: ".$email." matches? ".$ftest);
        }else{
            print("yes email: ".$email." matches? ".$ftest);
        }

OUTPUT:
yes email: sunya.dickman at gmail.com matches? 1
no email: matches? 0

Can any one tell me:
1) why the email is lost
2) why the condition is tested twice anyway?
-- 
                      o
            o                 o
                O   O   O
      o  0   O s´unya O   0  o
        www.the-resort.com