On Fri, 2011-04-22 at 17:51 +0100, Niamh Holding wrote:
> KB> What you want instead is to match anything BUT a space /[^ ]+/. That
> KB> will prevent this part from matching beyond borders. More specifically,
> KB> it prevents matching any other data point and ensures the right hand
> KB> part actually is the rDNS as desired.
> 
> Well it happily appears to go beyond borders [...]
> 
> The regex
> /[^ ]+ rdns=.*dip\.t-dialin\.net/i

Please re-read my previous post, you just changed the wrong part.

The leading /^[^\]]+ rdns=/ was correct, as you even cited yourself from
the docs. It is bound to the beginning of the string, and ensures there
is no closing square bracket (a relay border) before the rdns value.

The /.*/ regex part you are using is wrong. It permits everything,
*including* whitespace and relay borders. Between the rdns key and
value, that's where no space must be allowed.

  /^[^\]]+ rdns=[^ ]+\.no\.space\.there /


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply via email to