[pmwiki-users] Wikipaths (was: PData support for pagelisting images)

V.Krishn webmaster at insteps.net
Thu Sep 7 19:34:40 CDT 2006


On Friday 08 September 2006 04:54, you wrote:
> On Fri, Sep 08, 2006 at 04:57:45AM +0530, V.Krishn wrote:
> > On Friday 08 September 2006 03:57, Patrick R. Michaud wrote:
> > > So, the regexp to find and replace this becomes something like:
> > >
> > >     preg_replace('/\\{(\\(\\w[^)]+\\)*)([^}]*)\\}/e',
> > >                  "ApplyFunctions(PSS('$1'), PSS('$2'))", $x, $match)
> >
> > not quite sure, should it be
> >  preg_replace('/\\{(\\(\\w[^)]+\\))*([^}]*)\\}/e',
> > //-----------------check n no of func------------
> >                  "ApplyFunctions(PSS('$1'), PSS('$2'))", $x, $match)
>
> Oh, we were both almost there.  It really needs to be:
>
>     preg_replace('/\\{((?:\\(\\w[^)]+\\))*)([^}]*)\\}/e',
I can already see some 10 to 12 lines of preg_replace for
{(function args)Group.PageName$[?:# ...](index)var},
Not to mention the filtering of allowed functions with allowed options 
security wise.

Is it going to be ParseVars().... just kidding.

Definetely time for next beta and time to come up with few more PITS ;-)

V.Krishn
>
> The point is to get all of the (...) functions into $1.
>
> With all of those parentheses in there, perhaps it really is LISP!  :-)
>
> Pm




More information about the pmwiki-users mailing list