Re: [exim] Re: Whitespace in lookups

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Andreas Metzler
CC: exim-users
Asunto: Re: [exim] Re: Whitespace in lookups
On Fri, 8 Jul 2005, Andreas Metzler wrote:

> Mark Smith <exim-users@???> wrote:
> > Can someone show me how to perform an lsearch lookup for a string containing
> > whitespace? For example, to look up the string "Test String".
> [...]
>
> Hello,
> I do not think it is possible, quoting
> <http://www.exim.org/exim-html-4.50/doc/html/spec_9.html#CHAP9>:
> | lsearch: The given file is a text file that is searched linearly for a
> | line beginning with the search key, terminated by a colon or white
> | space or the end of the line.
>
> So having this in the lookup file:
> white space: value
>
> would have the effect that you could lsearch for "white" and get
> "space: value" but *not* to lsearch for "white space" and get "value".


You didn't read far enough... :-) Two paragraphs further on, it says:

In most lsearch files, keys are not required to contain colons or #
characters, or whitespace. However, if you need this feature, it is
available. If a key begins with a doublequote character, it is
terminated only by a matching quote (or end of line), and the normal
escaping rules apply to its contents (see section 6.12).

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book