private static void isFixedNumeric() { String regex="\d{6}"; String target="023300"; Pattern pattern=Pattern.compile(regex); boolean matches = pattern.matcher(target).matches(); System.out.println(matches); }
判断字符串长度是否为6的数字字符串
欢迎分享,转载请注明来源:内存溢出
private static void isFixedNumeric() { String regex="\d{6}"; String target="023300"; Pattern pattern=Pattern.compile(regex); boolean matches = pattern.matcher(target).matches(); System.out.println(matches); }
判断字符串长度是否为6的数字字符串
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)