String reg = ".+(.JPEG|.jpeg|.JPG|.jpg)$";
String imgp= "Redocn_2012100818523401.png";
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(imgp);
System.out.println(matcher.find());
Java 正则表达式验证图片格式
最新推荐文章于 2024-07-16 05:07:52 发布