Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

quoting/escaping in map lists

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


bill-exim at carpenter

Aug 23, 2008, 10:33 AM

Post #1 of 3 (331 views)
Permalink
quoting/escaping in map lists

The various list operators introduced a few releases ago (map, reduce,
forany, forall, etc) are very handy. Is there any syntax that quotes
or escapes the separator character in the list?

For example,

${map{a:b:c:d:e}{[$item]}}

I'd like to construct a list where one of the items in the list is the
3-character string "b:c". Is there a way to do it? I've tried
various things like ${quote:b:c}, etc, with no joy.

Obviously, if I were dealing with these literals, it would be easy to
figure out. I'm talking in general terms here, though. I want to
make a list that contains some arbitrary strings, so I can't predict a
good separator in advance.


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


jgh at wizmail

Aug 25, 2008, 1:50 PM

Post #2 of 3 (286 views)
Permalink
Re: quoting/escaping in map lists [In reply to]

WJCarpenter wrote:
> ${map{a:b:c:d:e}{[$item]}}
>
> I'd like to construct a list where one of the items in the list is the
> 3-character string "b:c". Is there a way to do it? I've tried
> various things like ${quote:b:c}, etc, with no joy.

Something like ${sg{foo}{:}{::}} ?

cf. http://exim.org/exim-html-4.67/doc/html/spec_html/index.html#toc0075


Cheers,
Jeremy

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


bill-exim at carpenter

Aug 25, 2008, 4:00 PM

Post #3 of 3 (283 views)
Permalink
Re: quoting/escaping in map lists [In reply to]

> WJCarpenter wrote:
>
>> ${map{a:b:c:d:e}{[$item]}}
>>
>> I'd like to construct a list where one of the items in the list is the
>> 3-character string "b:c". Is there a way to do it? I've tried
>> various things like ${quote:b:c}, etc, with no joy.
>>
>
> Something like ${sg{foo}{:}{::}} ?
>
> cf. http://exim.org/exim-html-4.67/doc/html/spec_html/index.html#toc0075
>

Thanks. That worked pretty well. The doubled colon does show up in the
map'd output, but I reckon I can deal with that.

${map{a:b::c:d:e}{[$item]}} ==> [a]:[b::c]:[d]:[e]



--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.