Add the
very useful variable to
FormattedSearch that
simply gives the number of items returned from a search returns the number of incidences of a regex string. Useful for such things as listing number of comments in a topic.
TWiki:Main.ColasNahaboo provided a patch implementing this feature for Cairo (see
TWiki:Codev.FormattedSearchCountVariable). I did a quick check to see if it could be easily modified for Dakar but couldn't find any corresponding code in Develop version of search.pm.
With some coaching (and prodding
) from
CC, I ported the patch provided by Colas to Develop version of lib/TWiki/Search.pm.
SVN 6244
LB
Added documentation to
FormattedSearch (just after
$pattern
).
SVN 6245
Also added note to
TWiki:Codev.DakarReleaseNotes#New_count_reg_exp_variable_in_TW.
LB
Side note: having carried this through, I realize it wasn't fully the feature I imagined. :-\ See revised text above. Still need feature for simply returning number of items found in a search. Separate feature request for another day...