httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: regex confusion..
Date Fri, 16 Jan 1998 15:09:22 GMT
On Fri, 16 Jan 1998, Ralf S. Engelschall wrote:

> 
> In article <Pine.BSF.3.95q.980115193700.10039O-100000@valis.worldgate.com> you
wrote:
> 
> > What should I need to match any file with a . or a z in the name?
> 
> > <Files ~ [.z]> seems right to me.  The . shouldn't have to be escaped in
> > the bracket expression.  It doesn't work for me. 
> 
> > Ok, so perhaps it is getting it confused with '[.' and '.]'.  Try [z.z],
> > no go.
> 
> > What am I doing wrong?
> 
> > What I am really trying to make is a regex that matches any file without a
> > . in the name, which should be easy but I cna't get there...
> 
> Although one used things like m/[.z]/ in Perl, this is just a special case of
> m/.*[.z].*/, so I think your error is that our Apache "~" operator does not
> imply the .* prefix and postfix. For Apache you have to explicitly say <Files
> ~ .*[.z].*> I think because the regex library itself usually does not append
> the prefix and postfix automatically.

Ok.  That doesn't make sense since [z] works fine, but...

<Files ~ .*[.].*> 

works ok for only matching files with a . in them, but:

<Files ~ .*[^.].*> 

won't match the reverse.


Mime
View raw message