I know this is a very simple question but since I am very bad in regex , have to ask below question. I want to write a regex expression in java which will match below two url patterns given :
{contextPath}/javax.faces.resource/**
{contextPath}/rfRes/**
The url will be read from http request object and will be compared using java pattern object like below :
Pattern p = //regex here ;
p.matcher(r.getRequestURL().toString()).matches();
Can anybody help me in writing a regex experion for above two urls ?
**in URL?HttpServletRequestreference to be able to get context path?request.getRequestURI()and get first part