JAVA正则验证windos路径
public static final String pattern1
= "(^//.|^/|^[a-zA-Z])?:?/.+(/$)?";
String pattern
= "**************";
boolean flg
= pattern
.matches(pattern1
);
if(!flg
){
throw new BusinessException("请填写正确的模型路径");
}
转载请注明原文地址: https://lol.8miu.com/read-35305.html