[pmwiki-users] smarter PageStore::ls() parameters?

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 23 15:20:53 CDT 2006


On Tue, Oct 17, 2006 at 11:31:19AM -0700, Martin Fick wrote:
> --- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> > and I'm interpreting "array of patterns" to
> > essentially mean "array of regex".  Do many 
> > databases allow filtering of records based on 
> > regexes?
> 
> This really is sad isn't it.  Afterall, one of the
> primary reasons for using a db is to have quick
> searches and yet the sql standard is SOOO lame when it
> comes to lookup syntaxes!  
> 
> But, since you asked the question and I thought I
> recalled pg being able to handle it, I did a quick
> search and found the following:
> [...very useful links...]

Wow, that's cool that the free SQL implementations
know at least something about regexes.  I think we
might be able to come up with something, then.

> ... With the free DBs, you might even be close to
> getting a standard perlRE to work consitently across
> all 3!

Actually, I don't need even much of standard perlRE.  The RE's
that PmWiki constructs for selecting records are basically 
limited to the following metachars:

    ^  $  .   (   )   |   [   ]   *   

It also currently uses (?:...) syntax, which is perl-specific,
but that could probably be changed to a simple (...) if needed.

I may see if I can come up with a skeleton MySQL-based pagestore
recipe for 2.2.0-beta, just to give people something to play with.

Many thanks!

Pm




More information about the pmwiki-users mailing list