Re: [exim] $extract question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Peter Bowyer
Datum:  
To: exim users
Betreff: Re: [exim] $extract question
On 10/07/05, Andrew <andrew@???> wrote:
> Hi All,
>
> I am trying to extract the first character of a string (i'm using exim 4.50)
>
> I have see the definition of extract, and it requires a seperator...I
> have tried leaving it blank -
> ${extract{1}{}{abcdefg}}
>
> But I still get "abcdefg" (but I want just "a").
>
> I looked through the manual, but could not find any function that will
> do this? (my other alternative is to run an external command, but I
> would like to save the cpu cycles and complexity) :)
>
>
> Any suggestions?


Either of these:

${substr_0_1:abcdefg}
${length_1:abcdefg}

http://www.exim.org/exim-html-4.50/doc/html/spec_11.html#IX821

Peter

--
Peter Bowyer
Email: peter@???
Tel: +44 1296 768003
VoIP: sip:peter@???