[pmwiki-devel] MatchPageNames

Patrick R. Michaud pmichaud at pobox.com
Tue May 22 16:17:44 CDT 2007


On Tue, May 22, 2007 at 10:04:08PM +0100, Hans wrote:
> Tuesday, May 22, 2007, 9:47:03 PM, Patrick wrote:
> > Any chance you could give an example of code that is
> > showing the wrong value?
> 
> For instance this:
> 
>    echo (boolean)MatchPageNames('Forum.Test1','-PmWiki.*,-Site.*');
> 
> will echo 1.
> But the target page is not part of the pattern.

Ummmm, yes it is.  The pattern says "all pages that are not
in the PmWiki or Site groups", and since 'Forum.Test1' isn't
in either of those groups, it matches the pattern.

So MatchPageNames() is correctly returning 1 in this case,
since exactly one page from the list ('Forum.Test1')
matches the pattern '-PmWiki.*,-Site.*'.

Pm



More information about the pmwiki-devel mailing list