OK, so I am doing a deployment of JSPs, only. Works great with one minor annoyance, I have some zz_preview.jsp files that get deployed.I use includePattern regex=".*\.jsp$"Since I cannot use an excludePattern with the includePattern, I need to change the regex to not zz_ and is .jsp.My attempts have so far failed.Tips/pointers/RTFMs/Code Fragments appreciated.Andy
Deploying from workarea, not staging. Not all of the zz files are in the doc root, so I changed it to ".*/[^z][^z][^_].*\.jsp$]"That looks like it is working, stops ALL jsps.hmmmm, will hack some more.
It certainly did not like the last one, everything went
Well, lots of IWOV configurations do not like "lookaround assertions" in regexes. More traditional form (without assertions) would be something like that:"[\\\/]([^z]..|z[^z].|zz[^_])[^\\\/]*\.jsp$"
No I neglected to try that. It worked. Cool.I tested with a pretty solid number of variations (including zz_ in the file name) and it works well.ThanksAndy
In the old days ) pre-> include pattern regex availability, we had to reverse engineer the exclude only regex pattern to be an include. Here is the excludepattern regex that includes only jsp's . "(([^.]...)|(.[^j]..)|(..[^s].)|(...[^p]))$" Hope this helps
This regex is valid as it is working in production as we speak
Let me know if I can walk you thru it
you could spend forever trying to come up with one regex for the whole requiement...
How is this not part of topic? I was providing an alternate solution to satisfy the requirement. Seems like my solution would more gracefully scale for future projects. As far as the exclude regex, it is setup to find everything but jsp. Instead of me explaining that further, why not put it in a regex validator and play with it, unless you absolutely need me to do this and screen print the result. This was implemented in a solaris env.
I use includePattern regex=".*\.jsp$"...I need to change the regex to not zz_ and is .jsp
Here is the excludepattern regex that includes only jsp's. "(([^.]...)|(.[^j]..)|(..[^s].)|(...[^p]))$"
Ok. Sorry if my logic does not make sense. But using to exclude statements is far more scalable that one monster statement. If I have time I will attach some regex matches on this statement. Have a wonderful day