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

I don't see a need for a look ahead. Try:

#!/usr/bin/perl use warnings; use strict; for my $test ( 'https://www.robidu.de/', 'http://www.robidu.de/', 'https://robidu.de/', 'https://forum.robidu.de/' ) { if ($test =~ m~^https?://(?:www\.)?robidu\.de/~) { print "'$test' matched\n"; } else { print "'$test' didn't match\n"; } }

Prints:

'https://www.robidu.de/' matched 'http://www.robidu.de/' matched 'https://robidu.de/' matched 'https://forum.robidu.de/' didn't match
Premature optimization is the root of all job security