This is the historical archive of the now-inactive 'grubstreet' list.
Discussion on OpenGuides development has now moved to OpenGuides-Dev. Discussion on The Open Guide to London now takes place on OpenGuides-London.

Re: [grubstreet] Documentation for the search?

[prev] [thread] [next] [lurker] [Date index for 2002/12/18]

From: Ivor Williams
Subject: Re: [grubstreet] Documentation for the search?
Date: 00:11 on 18 Dec 2002
----- Original Message -----
From: "Kate L Pugh" <kake@xxxxx.xx>
To: <grubstreet@xxxxxxx.xxxxx.xx>
Sent: 17 December 2002 20:20
Subject: [grubstreet] Documentation for the search?


> Hello.  I read over some old issues of the mailing list but couldn't
> find any documentation on how to create search strings that will work
> with the new search.
>
> Specifically, I'm wondering why a search on
>   ( takeaway | takeaway;)           [0]
> returns
>   http://grault.net/cgi-bin/grubstreet.pl?China_Inn,_SW6_3JJ
> as does one on
>   ( takeaway | takeaway).*fulham    [1]
> but one on
>   ( takeaway | takeaway;).*fulham   [2]
> doesn't.
>
> It doesn't look like the search is just ignoring the ';' character,

Not quite sure how it's parsing that - I would expect it to reject a semicolon. The word search just matches words made up of \w
characters. It specifically treats punctuation including ';' as non-word characters.

Also not sure what you are trying to achieve. Will a search on takeaway&fulham not do the trick?

> since search [0] works.  Can anyone help me figure this out?  I tried
> substituting ',' and ':' for the ';' and had the same results.

To look for an exact string which includes punctuation characters, you need a pair of double quotes round the whole string. Then,
everything is _literal_ between the "" and case sensitive.

> Also I have a bug report; searching on just '(' or ')' gives an
> internal server error.

Not bug but feature. Brackets are used for expression grouping, and will be a syntax error if not properly matched. If you want to
match a single open or close bracket, use the double quotes.

Hope this helps,

Ivor.


-- 
grubstreet mailing list
http://london.openguides.org/old-list-archives/