比如一个email:[email protected]
我要判断这个邮件地址的有效性,有何种可靠而方便的方法
望不吝赐教

解决方案 »

  1.   

    如何判断字符串是否是有效EMAIL地址
    ------------------------------
    function IsEMail(EMail: String): Boolean; 
    var s: String;ETpos: Integer; 
    begin 
    ETpos:= pos('@', EMail); 
    if ETpos > 1 then 
    begin 
    s:= copy(EMail,ETpos+1,Length(EMail)); 
    if (pos('.', s) > 1) and (pos('.', s) < length(s)) then 
    Result:= true else Result:= false; 
    end 
    else 
    Result:= false; 
    end;
      

  2.   

    可以参照‘http://www.7880.com/Info/Article-3a52b9a0.html’
      

  3.   

    謝謝 marshalidle() 提供文章...