Page 1 of 1

\.exe isn't same as \.EXE

PostPosted: Mon Aug 11, 2003 1:37 pm
by Vanguard
I was wondering some of the files that I was supposed to be rejecting were still getting accepted. Then I realized that the filenames were capitalized. I went back into the Subject and File filters and found that I could enter lower- and upper-case versions of each expression, as in:

\.exe
\.EXE
\.ht(m|ml)
\.HT(M|ML)
\.vbs
\.VBS

So are the regular expressions case sensitive (in how they get applied in filtering in/out strings and filenames)? I have a list of about 30 expressions to reject certain strings or files. If they are case sensitive then this list will double to 60 expressions. And, of course, if I were to cover every permutation of lower- and upper-case characters then I would have several hundred expressions, like:

\.exe
\.exE
\.eXe
\.eXE
\.Exe
\.ExE
\.EXe
\.EXE

or more simply:

\.[eE][xX][eE]

and the one for rejecting HTML files would become:

\.[hH][tT]([mM]|[mM][lL])

or maybe this might work:

\.[hH][tT]([mM][lL]?)

The expressions get a lot more complicated if I also have to take in account capitalization.

PostPosted: Mon Aug 11, 2003 2:51 pm
by Smite
\.[hH][tT]([mM][lL]?)


This should work, but I'm not sure I see the need for the brakets.