httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: cvs commit: httpd-2.0/docs/conf httpd-std.conf
Date Fri, 16 Feb 2001 07:50:44 GMT

>  Replace my horribly stupid regular expression with a slightly less stupid
>  one.
>  
>  Revision  Changes    Path
>  1.23      +1 -1      httpd-2.0/docs/conf/httpd-std.conf
>  
>  Index: httpd-std.conf
>  ===================================================================
>  RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf,v
>  retrieving revision 1.22
>  retrieving revision 1.23
>  diff -u -d -b -u -r1.22 -r1.23
>  --- httpd-std.conf    2001/02/13 20:30:12     1.22
>  +++ httpd-std.conf    2001/02/15 00:57:17     1.23
>  @@ -752,7 +752,7 @@
>   #
>   # To use server-parsed HTML files
>   #
>  -#<FilesMatch "\.shtml[.$]">
>  +#<FilesMatch "\.shtml(\.|$)">

Hmmm.. I don't know exactly what you want to match here (I guess
"xxx.shtml" and "xxx.shtml.yyy", right?), but I think it is still
broken. Because most regex libraries accept the dollar as the EOS anchor
only if present as the really last character of a regex string (else a
dollars matches a plain dollar character).

So I think some regex libraries will match now only "xxx.shtml$",
"xxx.shtml$yyyy" and "xxxx.shtml.yyy". But I'm sure this isn't what
you want, right? I think you have to write "\.shtml(\..+|)$" or
alternatively "\.shtml(\..+)?$". I personally would use the second one,
because I like this style. But both are equal in matching.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message