Hi Mark
On Thursday, August 24, 2017 at 2:59:52 PM UTC-5, Mark S. wrote:
>
> Regular expressions in javascript can return sub-groups for non-global
> expression searches. It might be possible to implement this in regexps, if
> someone can think of a good use-case. Mostly, instead of "removeprefix" and
> "removesuffix", you could grab whatever text you wanted from the middle of
> a tiddler title or filter stream. You could even make a single title (or
> field) split into multiple filter outputs. Once again -- what would be a
> use-case?
>
>
Okay, I'm trying my best to not make this long-winded. My use case is as
follows...
I'm writing a documentation TW for an app. It has logical *chapters* and
*sections* within chapters called *chapsec*s (*1 chapsec* = 1 tiddler).
I'm trying to take the approach that the system will be a good authoring
tool for... well, authoring anything "book-like".
Within *chapsec* tiddlers, I use annotations macros to annotate the text.
Annotations can be enabled (made visible) and disabled (made invisible)
globally. The annotation macro is named *bk-ann*.
What I'd like to do is, for each *chapsec*, find all *bk-ann*s in the text
field and list their content. An example might be...
<<bk-ann "Explain the use of the Tiddlywiki's macro
system">>
and
<<bk-ann "Explain the scope rules of Tiddlywiki
macros">>
As you can see, this text could become a synopsis of each *chapsec* if I
could figure out a way to re-use the annotation text. The output would
render:
* Section 1-010 synopsis:*
* Explain the use of the Tiddlywiki's macro system Explain the scope
rules of Tiddlywiki macros*
I'm guessing we're not quite there yet? But hoping I'm wrong :)
--
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 post to this group, send email to [email protected].
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/a54ee59d-f453-4c8f-9a77-51d1d9dc263c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.