cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [Cocoon 2] Regex matchers :-)
Date Sat, 13 May 2000 00:19:11 GMT
Donald Ball wrote:
> 
> On Fri, 12 May 2000, Stefano Mazzocchi wrote:
> 
> > Now, how can this work using full regexp? say we allow the use of
> > pluggable matching with sort of XPointer syntax
> >
> >  <redirect
> >   source="regexp(/htdocs/foo/[a|b|c]/index.html)"
> >   target="/xdocs/*/index"
> >  />
> >
> > What does the star mean? [a|b|c]? I can't see how this can be easier
> > than using wildcards... less verbose, totally, but reducing verbosity
> > doesn't always increase readability, expecially in configurations.
> 
> you would do this:
> 
> <redirect
>  source="regexp(/htdocs/foo/([a|b|c])/index.html)"
>  target="/xdocs/$1/index"
> />
> 
> $1 refers to the first paranthesized match, $2 the second, etc. Have you
> never used perl or general UNIX regexps before? The pattern matching and
> variable referral rules are well understood.

Uh, guess I'm showing my win32 background, aren't I :)

All right, dudes, as I said, I'm -0 on this, which means: if you code it
and integrate it, fine, but I'm not going to write that code :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message