On Saturday, October 10, 2020 at 1:06:50 AM UTC-7, [email protected] wrote: > > Thanks a lot. > But further, if I want to catch the match like this: > ``` > <$set name="pattern" value="{{the (.*?) thing}}"> > <<list-links "[regexp:text<pattern>]">> > </$set> > ``` > How can I get the (.*?)'s value? >
The TWCore regexp[...] filter only tests for a match, but doesn't support extracting "grouped" text matches (i.e., embedded patterns surrounded by parentheses). However, there is an add-on filter named regexps[...] (the "s" is for string) that DOES return the matching group(s)... https://github.com/Marxsal/TiddlyWiki5/blob/regular_expression_strings/core/modules/filters/regexps.js If you copy the above code into a tiddler (e.g., $:/filters/regexps.js) and then save-and-reload, you can then use regexps:text<pattern> to get the matched text. enjoy, -e -- 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/885c482d-1beb-42f0-91d9-16acde5ad01eo%40googlegroups.com.

