Auteur: Graeme Fowler Date: À: exim users Sujet: [exim] Edge case - space separated list objects
Afternoon all
I'm trying to do some manipulation of the From: field display name section in order to do matching against a remote data source.
To do this, I want to take the name "Fred Bloggs" and turn that into "fredbloggs" and "bloggsfred". That bit is easy, using the sg operator with a match and the resulting $1, $2 item values.
The edge case is that for entities of three or more words (well, actually for the two word case too) I don't want to have to hard-code a set of ever-longer matches and assignments using $3, $4 etc - I'd like to be able to use something to do this dynamically using the map operator. For this I'm trying to use the ${listcount: expansion to give me the number of elements.
However... using a space separated list is proving to be a challenge. Bizarrely: