On Saturday, May 22, 2021 at 12:46:19 PM UTC-7 [email protected] wrote:

> is there a command that could be used to remove certain tags that meet a 
> specific criteria , say for example all tags that have a "#"  maybe ?
> so if tiddler A  has "tag 1" "#tag 2" "tag 3"
> is there a way to remove #tag 2  for example
> i am also doing this part of creating a new  tiddler that inherits tags 
> from another tiddler , but i dont want all of the tags
>

Try this:
<$button> test this
<$vars lb="[[" rb="]]">
<$action-sendmessage $message="tm-new-tiddler"
   tags={{{ [[Tiddler 
A]get[tags]enlist-input[]!prefix[#]addprefix<lb>addsuffix<rb>join[ ]] }}} />
</$vars>
</$button>

Notes:
* [Tiddler A]get[tags] gets the tags field value as a single text string
* enlist-input[] converts this to a list of individual tags
* !prefix[#] filters out the undesired tags
* addprefix<lb>addsuffix<rb> adds doubled brackets surrounding each tag (in 
case the tag names contain spaces
* join[ ] reassembles the individual tags back into a single text string

enjoy,
-e

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fc0120b0-ee60-4672-8f98-1e61c6729268n%40googlegroups.com.

Reply via email to