Re: htdig: RESTRICT Question (SOLUTION [I think])

Jesse op den Brouw (
Fri, 14 Nov 1997 16:25:53 +0100

Jason Oesterly wrote:
> Hello-
> I would like to set the RESTRICT form variable in a way that limits results
> to URL's containing either of two strings. For instance, I'd like to show
> results from only two sites such as '' and ''
> (but not other sites in the database). Is this possible?

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
Sector Techniek Netherlands
Afdeling Elektrotechniek +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:12 PST