Re: htdig: Regular expressions in "exclude"? Really? (v3.1.0b4)


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Tue, 5 Jan 1999 15:05:34 -0600 (CST)


According to Geoff Hutchison:
>
> At 2:58 PM -0500 1/4/99, Gunnar Helliesen wrote:
> >OK, after reading this I upgraded to version 3.1.0b4 today. "exclude"
> >now works, but not with regular expressions. I can get htsearch to
> >exclude a literal string anywhere in the URL, but it doesn't understand
> >regexps as far as I can tell.
>
> This is correct. I don't believe it says anything about regexps anywhere in
> the documentation. It would be a good feature request (hey, send it to
> htdig3-bugs@htdig.org...)
>
> >http://www.mydomain.com/archives/199808/
> >
> >but I _do_ want all documents below that directory containing any of the
> >search words to be returned. For example, this document should be
> >returned:
> >
> >http://www.mydomain.com/archives/199808/msg00003.html
> >
> >I tried setting "exclude" to "/$" and "\/$" (the latter shouldn't really
> >be necessary, should it?) and ".*/$" with no effect. Directory indices
> >were still returned.
>
> I'd use restrict. Something like this should work
>
> restrict="http://www.mydomain.com/archives/199808/|.html"
>
> This will make sure all pages will have URLs that match *both* restrict
> criteria.

Actually, no. Multiple restrict patterns will make sure that all pages
have URLs that match *any* of the patterns, not *all* of the patterns.
E.g.:
        restrict="/199808/|/199809/|/199810/"
will allow pages from any of the three subdirectories listed.

Unfortunately, I don't see an easy way of doing what Gunnar asks.
The use of regular expressions in exclude and restrict lists has been
requested or suggested before, but hasn't ever been implemented in
htsearch.

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Thu Jan 07 1999 - 07:52:38 PST