摘要: 只能输入数字:"^[0-9]*$"。只能输入n位的数字:"^\d{n}$"。只能输入至少n位的数字:"^\d{n,}$"。只能输入m~n位的数字:。"^\d{m,n}$"只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$"。只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2 阅读全文
posted @ 2018-09-25 20:52 远里歌声_why 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 参考博客:https://www.cnblogs.com/wangzn/p/7212587.html https://www.cnblogs.com/go4mi/p/6426215.html package phone;import java.util.regex.Matcher;import ja 阅读全文
posted @ 2018-09-25 18:10 远里歌声_why 阅读(74847) 评论(3) 推荐(3) 编辑