xif-fr / dokuwiki-plugin-catlist

DokuWiki plugin to list pages and namespaces recursively in nested lists
https://www.dokuwiki.org/plugin:catlist
8 stars 15 forks source link

Include only pages matching regex? #4

Closed FosseWay closed 2 years ago

FosseWay commented 6 years ago

The various -exclude options are very useful, but is there a way to do the opposite, i.e. include only pages matching a regex?

For instance, if I have a namespace :cities which contains :cities:london:start, :cities:paris:start, :cities:berlin:start and also :cities:paris:museums, how would I show only the page :cities:paris:museum in my catlist results?

I'm hoping for something like: <catlist :cities -includePage:"^museum$" but at the moment I find myself doing things like <catlist :cities -noHead -exclupage:"(?=^((?!museum).)+$)">.

Am I missing something, or is this a feature worth adding?

xif-fr commented 6 years ago

I will add it, it's quick to do, but I can't tell when. Maybe next month.

xif-fr commented 3 years ago

I implemented what should be a solution in the last commit : negating a regex with like <catlist -excluPage!:"theregex". Tell me if it fits your needs.