In the project I'm working on, I'm using a lot of Latex equations and a lot of different variables in the equations so I wanted to create a template that would automatically pull in the tiddlers for the variables (tagged with "Variable") if they exist in the current tiddler field of "equation". My problem is that I can't seem to get regular expressions to work that way (backwards).
For example, I can create a list of equations a variable is in (equation tiddlers are tagged "Equation"). \define makePattern() ^<.*?(?:=).*?(?:=).*?(?:$(var)$) \end </$set> <$set name="var" value={{!!variable}}> <$set name="varpattern" value=<<makePattern>>> <$list filter="[tag[Equation]regexp:equation<varpattern>]"> <$transclude field="title"/> <$transclude field="equation"/> </$list> </$set> </$set> However, I can't do the opposite, because what I would need to do is something like this but the longer string I am wanting to search into is the input into the regexp, not the object. \define makePattern() ^<.*?(?:=).*?(?:=).*?(?:$(var)$) \end <$set name="eq" value={{!!equation}}> <$set name="eqpattern" value=<<makePattern>>> <$list filter="[tag[Variable]regexp:variable<eqpattern>]"> <$transclude field="title"/> <$transclude field="variable"/> </$list> </$set> </$set> Any ideas? Can regexp be used that way? I was thinking some combination of nested lists might help, and I tried my hand at creating a custom macro, but I haven't been able to figure this out. Thanks, Sara -- 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 post to this group, send email to tiddlywiki@googlegroups.com. 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/ad4d314c-6bd0-4c86-9a72-93dd58abd336%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.