String regex = "[1-9][0-9]{,14}"; String qq = 123456789; Boolean flag = qq.matches(regex); //告知此字符串是否匹配给定的正则表达式
正则:字符串匹配
原文:https://www.cnblogs.com/gxlaqj/p/10713074.html