On 28 Jun 2006 at 10:39, Joshua Slive wrote:
> Can you verify if you get the same result if you put that regex on its own
> in a RewriteRule (rather than in a big chain)?
Interestingly, it works on its own, but not with the preceding rules.
I tried just the immediately preceding rule and cond and it fails:
RewriteCond $1 ^/cgi-sys/cgiwrap/guille/wiki.pl/([A-Z])(.*)
RewriteRule ^(.*)$ ^/cgi-sys/cgiwrap/guille/wiki.pl/${lc:%1}%2 [NS]
RewriteCond $1 ^/cgi-sys/cgiwrap/guille/wiki.pl/(.*)([a-z])([A-Z])(.*)
RewriteRule ^(.*)$ ^/cgi-sys/cgiwrap/guille/wiki.pl/%1%2_${lc:%3}%4 [N,NS]
> There is some possibility that this is a PCRE issue (the regex engine
> used by apache) with greedy processing. (It may not be backtracking
> to match the third group after it already matches the first and
> second.)
That would be a problem. I could see the first two matching fooBar as
%1 fooBa
%2 r
Is double bracing legal to force order? E.g.:
(.*)(([a-z])([A-Z]))(.*)
I'll try that and see what happens.
> If so, you could probably work around it by using
> ...wiki.pl/([a-z]+)([A-Z])(.*)
Unfortunately, that is not general enough to work. It would work on:
fooBar (one iteration)
but fail on:
foo_barName (e.g requires second iteration and underscore not matchable.)
Generalizing to ([a-z0-9_]+)([A-Z])(.*) would fail on:
from_Dave (not camel case in the first place and it would match)
Mike
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]