Morbi non enim facilisis, lacinia odio volutpat, congue arcu. Sed vel ullamcorper
magna, maximus malesuada nulla. Fusce pharetra commodo facilisis. <russ class="fred">---- #1 This is not
Latin.----</russ> Integer in justo ac diam <russ class="fred">---- #2 This is not Latin either.----</russ>
lobortis eleifend. Nullam vitae sollicitudin risus. Etiam ut aliquet nulla.
Morbi facilisis urna id lacus feugiat suscipit.
Quisque a nulla luctus lacus tincidunt euismod. Duis condimentum luctus leo a tristique.
Donec quis vulputate arcu, non lacinia purus. Nullam sit amet interdum
lorem. <russ class="fred">---- #3 Nor is this Latin.----</russ>
---- #1 This is not Latin.----
---- #2 This is not Latin either.----
---- #3 Nor is this Latin.----
<tag>CONTENT 1</tag> text not wanted <tag>CONTENT 2</tag> text not wanted <tag>CONTENT 3</tag>
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.
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/79251e6c-1209-4251-b61b-74d555b9e7e7%40googlegroups.com.
TTThis needs a little script.My find macro already do this. But it possible with regexpLet'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.
<$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>
<$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>
\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>>
If there was a regular expression filter, it could be done in one list statement:<$list filter="[{sample}splitregexp[\n]join[ ]regexps[(?g)<russ.*?>.*?</russ>]regexps[<russ.*?>(.*?)</russ>]]"
\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