Doesn't the "or" (aka pipe, "|") work in regular expressions? So you could 
test for all 4 patterns in one list filter.

Good luck!
Mark

On Wednesday, February 15, 2017 at 8:20:08 AM UTC-8, The Bo wrote:
>
> Hey,
>
> I try to build some sort of "TOC-toggle" where I want to remove not used 
> TOC-Tiddlers temporarily so that they won't be displayed in the TOC.
> The TOC is structured like this:
>
> 01
>   010
>    011
>       0110
>           01100
>           01111
>       0111
> 02
> ...
>
> I already found a way to bring back TOC-Tiddler with the following code:
> <$button>
> <$fieldmangler tiddler=<<currentTiddler>>>
> <$set name="digit-pattern4" value="(^[0-9]{5}\s)">
> <$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title
> <digit-pattern4>]">
> <$action-setfield $field='tags' $value={{!!toc_inactive}}/>
> <$action-deletefield toc_inactive/>
> </$list>
> <$set name="digit-pattern3" value="(^[0-9]{4}\s)">
> <$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title
> <digit-pattern3>]">
> <$action-setfield $field='tags' $value={{!!toc_inactive}}/>
> <$action-deletefield toc_inactive/>
> </$list>
> <$set name="digit-pattern2" value="(^[0-9]{3}\s)">
> <$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title
> <digit-pattern2>]">
> <$action-setfield $field='tags' $value={{!!toc_inactive}}/>
> <$action-deletefield toc_inactive/>
> </$list>
> <$set name="digit-pattern1" value="(^[0-9]{2}\s)">
> <$list filter="[is[tag]!tag[#]has[toc_inactive]regexp:title
> <digit-pattern1>]">
> <$action-setfield $field='tags' $value={{!!toc_inactive}}/>
> <$action-deletefield toc_inactive/>
> </$list>
> </$set>
> </$set>
> </$set>
> </$set>
> </$fieldmangler>
> </$button>
>
> The Problem is, that I have to click four times. ;-)
>
> Is there a simple way to do it in one click?
>
> Regards
> The Bo
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e0944db0-ea55-4224-9750-71628e6cb1da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to