I am trying to look for files with ".js", ".less", ".jsp", and ".png" files while also checking for them in many different directories for example "/MyProject/public/someSecurePage.jsp", "/MyProject/public/js/page/SecuredPage1/", "/MyProject/public/js/page/SecuredPage2/", "/MyProject/public/less/page/SecuredPage1/", etc
I am using the someString.macthes(regexString)
Right now I have 2 separate regexes, but I am not sure they are correct:
File exts
.*?\\.(jsp|less|css|png|js)$
Directories/Files
EDIT1:
.*?\\.(/MyProject/public/someSecurePage.jsp|/MyProject/public/js/page/SecuredPage1/|/MyProject/public/js/page/SecuredPage2/|/MyProject/public/less/page/SecuredPage1/)
EDIT1:
Another issue I am looking at is that this does not seem to look at /MyProject/public/js/page/SecuredPage2/securedPage2.js is not getting read correctly, my if statement is coming to false with this check.
My issue is that I am not actually sure that my files/ directories one is correct, because going through an if statement trying to match a directory, comes to false. I am new to using regular expressions
//are necessary, you should be able to just use a single slash..*?\\.(/MyProject/public/someSecurePage.jsp|/MyProject/public/js/page/SecuredPage1/|/MyProject/public/js/page/SecuredPage2/|/MyProject/public/less/page/SecuredPage1/)$I could be wrong though.