A while ago, I had some people in DevNet help me construct a regex to use in an excludePattern for a deployment configuration that would exclude *.jhtml except index.jhtml. This was a difficult regex to create, but Rob Huffstedtler was persistent enough to figure it out. While the regex he created works in a perl script, it does not work within a deployment config. When I enter it into the regex validator on the Interwoven site (
https://support.interwoven.com/tools/scripts/regex/RegexValidator.asp), it claims it's a malformed regex, but that's all the info I get. It would be nice if the tool reported which part of the regex it thinks is malformed. Since the deployment doesn't barf, I assume it thinks the regex is ok. My suggestion is, can the regex validator be made more useful by reporting more information when a regex is found to be malformed? And why would a regex work in perl (using iwperl that's shipped with TeamSite) and then be considered malformed by the validator?
Here's the regex:
(^|.*\/)(i(?!ndex(?=\.)).*|[^i\/][^\/]*)\.jhtml$
Here's the snippet of perl code I used to test this:
#!/interwoven/iw-home/iw-perl/bin/iwperl
my
@str = ("/doc/index.jhtml","index.jhtml","indx.jhtml","index.html","foo.jhtml","doc/Templates/foo.jhtml",
"./doc/Templates/index.jhtml");
foreach (
@str) {
if (/(^|.*\/)(i(?!ndex(?=\.)).*|[^i\/][^\/]*)\.jhtml/) {
print "$_ is excluded\n";
}
else {
print "$_ is NOT excluded\n";
}
}
exit;
Dave SmithSr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Edited by Smitty77 on 10/21/02 10:28 AM (server time).