Skip to main content.
home | support | download

Back to List Archive

Re: Filerules specifications

From: <moseley(at)>
Date: Wed Oct 08 2003 - 14:33:34 GMT
On Wed, Oct 08, 2003 at 03:55:45AM -0700, wrote:
> Hi...
> This is probably a simple query, but I can't get my head round it -
> sorry if so!
> I want to set up a FileRules line such that any documents of the form
> x*.htm are not indexed. That is, they start with the letter x AND are
> .htm files. 
> So I have tried something along the lines of 
> FileRules filename contains x*.htm

Because FileRules uses a regular expression (not a shell expansion).  
>From the docs:

  The regular expression is a C regex.h extended regular expression.

The above says match zero or more "x" characters followed by any
character followed by the string "htm".

Read up a bit on regular expressions.
> (and as many variants based on the examples in the manuals as I could
> think of!) but that particular one removes all .htm files. Is it
> possible to combine two commands - or how would I incorporate a suitable
> wildcard-type phrase?

I'm going to assume you are using Windows, so you might want to do 
case-insensitive matching (because .htm .HtM .HTM).

  FileRules filename regex /^x.*\.htm$/i

That said, I just tested and that didn't stop files from being indexed.  
So there may be a bug.  Stay tuned....

Bill Moseley
Received on Wed Oct 8 14:33:41 2003