正则表达式

it2022-05-09  23

import java.util.regex.Matcher; import java.util.regex.Pattern;        String check = '^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$'   Pattern regex = Pattern.compile(check);   Matcher matcher = regex.matcher(email);   if(!matcher.matches()){    Messagebox.show("请填写正确邮箱!","提示", Messagebox.OK, Messagebox.ERROR)    return   }       def domainClass = grailsApplication.getDomainClass("cn.com.mvt.plugin.reimburs."+domainName).clazz    applyno = domainClass.NUMBER_CODE + applyer.code    String[] maxapplyno = domainClass.executeQuery("select max(substr(r.applyno,8)) from "+domainName+" as r where r.applyno like '"+applyno +"%'")

转载于:https://www.cnblogs.com/zhouweiye/p/3594075.html


最新回复(0)