【java】正则表达式简单示例

1 public class Test {
2     public static void main(String[] args) {
3         String str="135axy";
4         String regEx="[0-9]{1,3}[a-z]{2,3}";
5         boolean m=str.matches(regEx);
6         System.out.println(m);        
7     }
8 }
View Code

 

posted @ 2017-03-17 19:51  xiongjiawei  阅读(146)  评论(0)    收藏  举报