There's that saying, "When all you have is a hammer, everything starts to
look like a nail."
All we have is regex. It would be great to have some other tool for
extracting actual DOM-like structures the way you
could with TW classic. But we don't have it.
Actually, the tool we have for regexp is also a bit lacking. There's no
tool for directly lifting desired target text. The new splitregexp only
splits, it doesn't
return the text we want to find. Here's my version that does most literally
what you ask for
<$vars realchars="[^\s]+">
<$list filter="[{test}splitregexp[\n]join[ ]splitregexp[<li>
]butfirst[1]splitregexp[</li>]butlast[1]regexp<realchars>]">
</$list>
</$vars>
Input:
More text here
<li>line 3</li>
<li>line 2</li>
<li>line 1</li>
More text there
Output
line 3 <https://tiddlywiki.com/#line%203>
line 2 <https://tiddlywiki.com/#line%202>
line 1 <https://tiddlywiki.com/#line%201>
Good luck!
On Thursday, August 22, 2019 at 2:21:34 AM UTC-7, TonyM wrote:
>
> Jeremy,
>
> You are aware I do not want so much to parse it as locate the content
> between matching tags.
>
> Its intention is to access content delimited by html tags inside the text
> content.
>
> Perhaps we could use it to retrieve items between the section div tags or
> all instances of text between the li tags.
>
> Regards
> Tony
>
>
--
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/11248d8f-46ca-45d6-b3fa-670f8b6c0c80%40googlegroups.com.