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: Kate L Pugh
Subject: Re: [grubstreet] Documentation for the search?
Date: 00:26 on 18 Dec 2002
Subject: Re: [grubstreet] Documentation for the search?
Date: 00:26 on 18 Dec 2002
Ivor wrote: > 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. Are you sure? A search on 'takeaway;' returns one page; a search on 'takeaway' many more. > Also not sure what you are trying to achieve. Will a search on > takeaway&fulham not do the trick? For that specific case, yes, but it was just an example. I'm after a more general solution to the problem of searching on words that can be part of other words. For example, if you search for 'pie' you get the Oxford Tube page, which has a Piers but no pie. Really I want to match on /\bpie\b/i, but the new search doesn't let you use regexes. > 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. A search on ( takeaway |" takeaway;").*fulham still fails. Also, I don't want case sensitivity. >> 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. I think it is a bug; it's an error that should be handled. Well, I'd consider it a bug, but it's your code. Kake -- grubstreet mailing list http://london.openguides.org/old-list-archives/
-
Re: [grubstreet] Documentation for the search?
Ivor Williams 00:11 on 18 Dec 2002
From: "Kate L Pugh" <kake@earth.li>-
Kate L Pugh
00:26 on 18 Dec 2002
Are you sure? A search on 'takeaway;' returns one page; a search on
-
Kate L Pugh
00:26 on 18 Dec 2002
-
Kate L Pugh
00:41 on 18 Dec 2002
As just discovered with Ivor's help over IRC, my confusion over this-
Ivor Williams
01:00 on 18 Dec 2002
From: "Kate L Pugh" <kake@xxxxx.xx>-
Kate L Pugh
01:13 on 18 Dec 2002
It already works like this. It uses LWP::Simple to get the
-
Kate L Pugh
01:13 on 18 Dec 2002
-
Ivor Williams
01:00 on 18 Dec 2002