Help with filter

32 views
Skip to first unread message

Jon

unread,
Dec 21, 2021, 2:18:36 AM12/21/21
to TiddlyWiki
Hi,

I have this as the 1st line of a filter

<$list filter=[regexp:text[Footnotes##myref1]]>

to find 'myref1' references, but I've discovered that it's also finding 'myref11', 'myref12' etc.

What do I need to include to get an exact match?

Regards
Jon

Charlie Veniot

unread,
Dec 21, 2021, 9:06:55 AM12/21/21
to TiddlyWiki
G'day Jon,

Sounds like you need something along the lines of:

<$vars expression="Footnotes##myref1([^0123456789]|\b)">
<$list filter="[regexp:text<expression>]">
{{!!title}}<br>
</$list>
</$vars>


Charlie Veniot

unread,
Dec 21, 2021, 9:12:03 AM12/21/21
to TiddlyWiki
Some alternatives that are more compact:

<$vars expression="Footnotes##myref1([^0-9]|\b)">

<$list filter="[regexp:text<expression>]">
{{!!title}}<br>
</$list>
</$vars>

<$vars expression="Footnotes##myref1(^\d|\b)">

<$list filter="[regexp:text<expression>]">
{{!!title}}<br>
</$list>
</$vars>

Jon

unread,
Dec 21, 2021, 2:28:02 PM12/21/21
to TiddlyWiki
Perfect!

Many thanks
Jon

Reply all
Reply to author
Forward
0 new messages