[pmwiki-users] Problem with $SearchPatterns

Peter Bowers pbowers at pobox.com
Sat Jun 28 14:32:39 CDT 2008


> $SearchPatterns['default'][] ='/^De\\./';
> $SearchPatterns['default'][] ='/^CRM\\./';
> $SearchPatterns['default'][] ='/^FAQ\\./';
> $SearchPatterns['default'][] ='/^Glossar\\./';
> $SearchPatterns['default'][] ='!^P\.!';

The function MatchPageNames() (which implements the $SearchPatterns[]
functionality) expects all INCLUSIVE conditions to be in a SINGLE
entry (EXCLUSIVE patterns can be in as many array elements as you
like).  Or, more accurately stated, it requires that ALL inclusive
patterns will be true (these inclusive patterns are combined with AND
instead of OR as might be expected).  Since no page can have a group
of De AND a group of CRM it doesn't match.

Here is what you are looking for, I believe:

$SearchPatterns['default'][] ='/^De\\.|^CRM\\.|^FAQ\\.|^Glossar\\./';
$SearchPatterns['default'][] ='!^P\.!';

I think that will do what you are looking for.

-Peter



More information about the pmwiki-users mailing list