in reply to regexp: Mind-boggling negative assertions...

if($referrer =~ /^https?:\/\/(?!www\.).*robidu.de\//)

Replies are listed 'Best First'.
Re^2: regexp: Mind-boggling negative assertions...
by Anonymous Monk on Aug 16, 2015 at 23:29 UTC

    If you don't like this solution, please give a list of URLs as test cases (maybe 10 or more) and clearly mark which should match (the complete regex) and which should fail.

Re^2: regexp: Mind-boggling negative assertions...
by Robidu (Acolyte) on Aug 16, 2015 at 23:29 UTC

    That's only a partial solution of the problem. "www.forum.robidu.de" still causes a nonmatch, although that is an address that is supposed to be rejected as well.

    It's supposed to be an extremely strict rule that lets pass only one particular address (for both http and https).

      A non-match *is* a rejection.

      Your English is too confusing. Please give an extensive list of URLs that cover all cases, and indicate whether they pass or fail.

        Where is this confusing? The point is that if the REGEXP matches, the SCRIPT is supposed to reject the address.

      Of course "www.forum.robidu.de" is rejected/nonmatch. It is missing "http://".