[pmwiki-devel] php ListPages question
Dominique Faure
dominique.faure at gmail.com
Wed Dec 5 13:05:54 CST 2007
On Dec 5, 2007 7:53 PM, Hans <design5 at softflow.co.uk> wrote:
> Wednesday, December 5, 2007, 6:06:44 PM, Dominique wrote:
>
> > perhaps:
>
> > $plist = ListPages("/^($GroupPattern)[.\\/]($NamePattern)$/i");
>
> > would do the trick.
>
> yes this works. Only it is not nice, when you try to feed the function
> a variable with wildcard patterns like A*.* Main.*
>
> $plist = ListPages("/^$wildpat/");
>
> I expected A*.* would give pages with groups beginning with A.
> Maybe this is a bug? Certainly not intuitive, and wrecks havock with
> some wildcard patterns.
>
>
> Hans
>
>
The function expects a regexp pattern. You could compute one from a
wildcard specification with something like:
$plist = ListPages(GlobToPCRE(FixGlob($wildpat)));
--
Dominique
More information about the pmwiki-devel
mailing list