On 25/08/2015 06:16, Will Robertson wrote:
> On 26 Aug 2015, at 09:14, aparsloe <[log in to unmask]> wrote:
>>
>> (1) I wanted to use \tl_replace_all:Nnn on a token list that might contain braced groups.
>
> We might want to consider a "nesting" map function that essentially disregards brace groups. This could be used to define a new \tl_replace_nested:Nnn or similar for exactly this purpose.
>
> I'm fairly sure Bruno already has code that does nested mapping as part of his "tl" extensions... What do others think?
I guess I'd want to know a bit more about use cases. As I've said on
LaTeX-L, normally brace groups are an 'escape' mechanism from the
scanner, so I'm not sure I'd expect recursive replacement as a general
thing. I'm wondering if this is being used for something rather 'text
like', which might be handled by l3regex (slow but for a smaller number
of cases reasonable).
Joseph