在Java中使用正则表达式检查在Java中使用
str.matches(regex_here)
正则表达式
例如:
if("asdhAkldffl".matches(".*[ABCDEFGH].*")) { System.out.println("yes"); }
在Java中使用正则表达式检查在Java中使用
str.matches(regex_here)
例如:
if("asdhAkldffl".matches(".*[ABCDEFGH].*")) { System.out.println("yes"); }