Re: htdig: multiple restricts -is it possible

Jesse op den Brouw (
Tue, 17 Feb 1998 13:41:38 +0100

Joachim Zobel wrote:
> Hi.
> Is there a way I can have a list of patterns for restrict, so that I get
> all results that match one of these patterns? I'm setting up a search
> engine for some documentation and I would love to have check boxes for
> certain areas to search.

>From previous questions about this subject:

This question has been posted before. I think I have a (or the)
When looking through the 3.08b2 source files, I found a line in
htlib directory, file


    // Go though each of the patterns and build entries in the table.
    int state = 0;
    int totalStates = 0;
    unsigned char previous = 0;
    int previousState = 0;
    int previousValue = 0;
    int index = 1;
    unsigned char chr;

    while ((unsigned char)*pattern)
        chr = trans[(unsigned char)*pattern];
        if (chr == '|')
            // Next pattern


It says "Go though EACH of the ....". So, it must be possible to
enter more patterns.

The line

         if (chr == '|')

gives the answer, I think: use a | (pipe sign). So this is what I
put in my search.html

         Beperk tot: <select name=restrict>
         <option value="">(geen beperking)
         <option>hogeschool web-server
2) <option selected>sector techniek
1) <option>sector I&I
         <option>sector E&M
         <option>sector OST
         <option>sector GG&M
3) <option value="|">technische sectoren

Note 3): it is a concatanation(?) of 1) and 2) and note the '|' sign.
I tested it once, and it worked for me. Gonna test is some more, but
maybe this is the solution.

J. op den Brouw Johanna Westerdijkplein 75
Haagse Hogeschool 2521 EN DEN HAAG
Faculty of Engineering Netherlands
Electrical Engineering +31 70 4458936
-------------------- ---------------------

Linux - because reboots are for hardware changes
To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the body of the message.

This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:25:41 PST