[EXIM] Additional string/token function for exim

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Nigel Metheringham
Datum:  
To: Philip Hazel
CC: exim-users
Betreff: [EXIM] Additional string/token function for exim
Philip,

I'm finally having to give in and implement a string function to extract a
section from a token separated string - ie like getting components out of
a passwd line.

I was thinking of making this something like:-
    ${token{<field>}{<sep>}{<string>}}


where:-
  <field>    - numeric field id >= 0 (first field is zero)
  <sep>        - class of characters acting as separators (as in strtok(2)
          or strchr(2))
  <string>    - string to parse


so in a passwd like line,
    ${token{5}{:}{<line>}}
would extract the home directory.


Are there any problems with this? Syntax/Name OK?? Any suggestions for a
better solution? etc...

    Nigel.
-- 
[ Nigel.Metheringham@???   -  Systems Software Engineer ]
[ Tel : +44 113 251 6012                   Fax : +44 113 234 6065 ]
[      Real life is but a pale imitation of a Dilbert strip       ]




--
*** Exim information can be found at http://www.exim.org/ ***