zoukankan      html  css  js  c++  java
  • 如何判断输入的字符串是电子邮件地址

    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;
  • 相关阅读:
    Flink
    数据工程师
    数据库中间件
    数据仓库
    数据库
    设计模式
    机器学习
    Collections
    Concurrency
    Java
  • 原文地址:https://www.cnblogs.com/sonicit/p/811692.html
Copyright © 2011-2022 走看看