JAVA正侧windos路径验证

it2026-03-16  4

JAVA正则验证windos路径

//验证的正则路径 public static final String pattern1 = "(^//.|^/|^[a-zA-Z])?:?/.+(/$)?"; //需要验证的路径 String pattern = "**************"; boolean flg = pattern.matches(pattern1); if(!flg){ throw new BusinessException("请填写正确的模型路径"); }
最新回复(0)