怎么实现上面的正则表达式
如何实现下面的正则表达式
需求:匹配所有不以/abc , /adc, /ded开头的url
要在web.xml中匹配filter用。
需求:匹配所有不以/abc , /adc, /ded开头的url
要在web.xml中匹配filter用。
1 楼
anson2003
2006-12-27
String regex = "^((/abc)|(/adc)|(/ded)).*";
System.out.println(!"/abc".matches(regex));
System.out.println(!"/abc".matches(regex));