Eble ... \define q(tid, tagname) <$list filter="""[{$tid$}splitregexp[\n]join[ ]splitregexp[<$tagname$.*?>]butfirst[1]]""" variable=item> <$list filter="""[<item>splitregexp[</$tagname$>]butlast[1]]""" variable= item2> <$text text=<<item2>>/><br/> </$list> </$list> \end
On Tuesday, September 17, 2019 at 10:57:22 AM UTC-7, coda coder wrote: > > Thanks to Josiah for proxy-handling this! > > Thanks Mark - that's pretty much nailed it. > > Can you think of/see a way to condense this into *one* macro? > > \define q-f1(tid, tagname) [{$tid$}splitregexp[\n]join[ ]splitregexp[< > $tagname$.*?>]butfirst[1]] > \define q-f2(tagname) [<item>splitregexp[</$tagname$>]butlast[1]] > > > \define q(tid, tagname) > <$list filter=<<q-f1 $tid$ $tagname$>> variable=item> > <$list filter=<<q-f2 $tagname$>> variable=item2> > <$text text=<<item2>>/><br/> > </$list> > </$list> > \end > > <<q 2-020 sauron>> > > > > . > > On Tuesday, September 17, 2019 at 11:58:49 AM UTC-5, Mark S. wrote: >> >> You don't seem to need realchars for this. So: >> >> <$list filter="[{mas01}splitregexp[\n]join[ >> ]splitregexp[<russ.*?>]butfirst[1]]" >> variable=item> >> <$list filter="[<item>splitregexp[</russ>]butlast[1]]" variable=item2> >> <$text text=<<item2>>/><br/> >> </$list> >> </$list> >> >> >> >> On Tuesday, September 17, 2019 at 9:21:08 AM UTC-7, Mark S. wrote: >>> >>> Actually, now I wonder if the original code was undertested. >>> >>> You need a nested list inside the first one: >>> >>> <$vars realchars="[^\s]+"> >>> <$list filter="[{mas01}splitregexp[\n]join[ >>> ]splitregexp[<russ.*?>]butfirst[1]]" >>> variable=item> >>> <$list filter="[<item>splitregexp[</russ>]butlast[1]]" variable=item2> >>> <$text text=<<item2>>/><br/> >>> </$list> >>> </$list> >>> </$vars> >>> >>> In this example {mas01} refers to a tiddler with your test text. >>> >>> >>> >>> On Tuesday, September 17, 2019 at 7:48:20 AM UTC-7, @TiddlyTweeter wrote: >>>> >>>> Okay. Let's hope. xxx >>>> >>>> On Tuesday, 17 September 2019 16:34:35 UTC+2, Mohammad wrote: >>>>> >>>>> TT >>>>> This needs a little script. >>>>> My find macro already do this. But it possible with regexp >>>>> >>>>> Let's see what Mark has to say. >>>>> >>>>> On Tue, Sep 17, 2019, 6:59 PM @TiddlyTweeter <tiddly...@assays.tv> >>>>> wrote: >>>>> >>>>>> I'm not really getting anywhere on this. >>>>>> >>>>>> Maybe TW filters are INCAPABLE of discarding text? >>>>>> >>>>>> I'd like to know. The issue is this ... >>>>>> >>>>>> I need CONTENT 1-3 returning, but nothing else... >>>>>>> >>>>>> >>>>>> >>>>>> <tag>CONTENT 1</tag> text not wanted <tag>CONTENT 2</tag> text not >>>>>> wanted <tag>CONTENT 3</tag> >>>>>> >>>>>> >>>>>>> >>>>>>> I could not work out how to do that. >>>>>>> >>>>>> >>>>>> TT >>>>>> >>>>>> >>>>>> -- >>>>>> 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 tiddl...@googlegroups.com. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/tiddlywiki/79251e6c-1209-4251-b61b-74d555b9e7e7%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/tiddlywiki/79251e6c-1209-4251-b61b-74d555b9e7e7%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- 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/860129aa-6311-40aa-8fe6-d2d485d527d8%40googlegroups.com.