public static final Pattern CODE = Pattern.complie("[0-9]{6}$");//6位数字正则验证
String code = "123456";
boolean result1= Pattern.matches("[0-9]{6}$",code);
boolean result2= CODE.matcher(smsCode).matches()
public static final Pattern CODE = Pattern.complie("[0-9]{6}$");//6位数字正则验证
String code = "123456";
boolean result1= Pattern.matches("[0-9]{6}$",code);
boolean result2= CODE.matcher(smsCode).matches()