main
parent
57d5e11f5c
commit
d05bf19923
@ -0,0 +1,13 @@
|
||||
package UnitTest;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class TestRegex {
|
||||
public static void main(String[] args) {
|
||||
//1、是否匹配
|
||||
String content="应用心理学(6000元/年;色盲、色弱者,不予录取.以上体检要求,录取时以高考体检表为准)";
|
||||
String pattern=".*(6000元/年.*)";
|
||||
boolean isMatch = Pattern.matches(pattern, content);
|
||||
System.out.println(isMatch);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue