正则:字符串匹配

String regex = "[1-9][0-9]{,14}";

String qq = 123456789;

Boolean flag = qq.matches(regex);    //告知此字符串是否匹配给定的正则表达式
原文地址:https://www.cnblogs.com/gxlaqj/p/10713074.html