Karsten Bräckelmann wrote:
Hey Per, deliberately off-list and off-bugzilla I assume? :)
Yeah, whilst we're nit-picking :-)
On Tue, 2010-11-16 at 19:37 +0100, Per Jessen wrote:
I'm guessing redirector_pattern actually only ever uses the FIRST
backreference? I haven't checked the code, but that's how I would write
it - always look at the first backreference, ignore any others.
Not diving into the code either -- I believe that is correct, the first
capturing match is being used by backreference $1.
How about this text:
The target URI is identified by the first backreference.
As substitution for what?
Such that the 2nd paragraph would be:
The pattern must match the entire redirector URI including the target.
The target URI is identified by the first backreference. URI parsing
checks every URI string against every redirector_pattern that
is defined.
I like the fact the docs do not merely talk
about a backreference (which should be more precisely a capturing match
instead anyway), but clearly states how to use parentheses. In our
latest version at least. ;)
I like man pages to be helpful too, but it might be cleaner to say the
man page is restricted to spamassassin config syntax, whereas regex
syntax is documented elsewhere (e.g. man pcrepattern).
Feel free to bounce back on the dev list, if you want.
Good idea.
/Per