It's often the case that we need two nested listwidgets to break down the 
results the way we want. In your example, everything is split by ^, but 
then it picks the first item from the resulting list (a1).  You could 
instead split by space, send the result to an inner loop, and then split by 
^ .

But in this case, you could use splitregexp :

{{{ [enlist[a1^a2 b1^b2 c1^c2]splitregexp[\^\w\w]] }}}

a1,  b1, c1

On Thursday, April 29, 2021 at 2:15:04 PM UTC-7 jn.pierr...@gmail.com wrote:

> Toying with filters, I discovered that the split operator agglomerates its 
> results when ist operates on successive titles.
>
> for instance : {{{ [enlist[a1^a2 b1^b2 c1^c2]split[^][]first[]] }}}
> results in a1 not in a1, b1, c1
>
> a sufilter dos not change anything:
>
> <$vars sf="[split[^]dump[]first[]]">
> {{{ [enlist[a1^a2 b1^b2 c1^c2]subfilter<sf>] }}}
> </$vars>
>
> In fact, in each case, after split, the filter values are a1, a2, b1, b2, 
> c1, c2.
>
> could there be a way to have [a1, a2], [b1, b2], [c1, c2] 
> from enlist[a1^a2 b1^b2 c1^c2] ?
>
> let's use sortsub and a little input set to see that what I am asking for 
> may not be that impossible.
>
> <$vars sf="[split[^]dump[]last[]]">
> {{{ [enlist[a1^22 b1^28 c1^14]sortsub<sf>] }}}
> </$vars>
>
> reults in c1^14, a1^22, b1^28
>
> which demonstrate that here split produces things like c1, 14 on which 
> split act upon. exactly what I wanted to achieve with subfilter.
>
> -- 
> Jean-Pierre
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ef7168c8-3f38-406c-a829-bb55f4025073n%40googlegroups.com.

Reply via email to