{{||yeartemplate}}
<$set name="filt" value="^{{!!title}}10">
Number of entries: <$count filter="[regexp:startdate<filt>]"/>
</$set><$set name="filt" value="^201410">
<<filt>>
Number of entries: <$count filter="[regexp:startdate<filt>]"/></$set>
<$set name="filt" value="^{{!!title}}10">
<<filt>>
Number of entries: <$count filter="[regexp:startdate<filt>]"/>
</$set>^201410 Number of entries: 23
^201410 Number of entries: 0
Even though the "filt" variable which contains the regular expression is identical after transclusion, it doesn't find the matching tiddlers which are found when an identical regexp is hard coded. What's going on?
\define filt() ^$(dt)$10
<$set name="dt" value={{!!title}}>
Number of entries: <$count filter="[regexp:startdate<filt>]"/>
</$set>You're trying to "glue" the result of a transclusion into a string. Whenever you need to do that, you almost always need a macro. This worked in my quick test:
\define filt() ^$(dt)$10
<$set name="dt" value={{!!title}}>
Number of entries: <$count filter="[regexp:startdate<filt>]"/>
</$set>
<$wikify name="filt" text="^{{!!title}}10">
Number of entries: <$count filter="[regexp:startdate<filt>]"/>
</$wikify>