Brian Rectanus | 17 Aug 14:59

Re: Performance tip

On 8/17/06, Ivan Ristic <ivan.ristic <at> gmail.com> wrote:
> On 8/17/06, Alex V. <alex-security <at> ssji.net> wrote:
> > I'm absolutely not a regexp expert, but I'm wondering if it could not be
> > possible to write the regexp like this (or something similar):
> >
> > SecFilterSelective VAR (
> >       KEYWORD1|     # Comment explaining this match
> >       KEYWORD2|     # Comment explaining this match
> >       KEYWORD3|     # Comment explaining this match
> >       KEYWORD4|     # Comment explaining this match
> >       KEYWORD5|     # Comment explaining this match
> >       KEYWORD6     # Comment explaining this match
> > )
>
> It is not possible to use comments, but it is possible to break the
> regular expressions into multiple lines. like this.
>
> SecFilterSelective VAR "(\
> KEYWORD1|\
> KEYWORD2|\
> KEYWORD3)"
>
> It is important to not have any whitespace at the beginning of the
> line or before the continuation character "\".

Does Apache2 support the 'x' option to ignore whitespace and support
comments?  If so, you should be able to do this (but I have no time
right now to try it):

SecFilterSelective VAR "(?x:
  KEYWORD1|   #comment
  KEYWORD2|   #comment
  KEYWORD3    #comment
)"

-B

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Gmane