The regular expression: (?-imsx:^https?://(?!www\.)robidu\.de/) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- (?-imsx: group, but do not capture (case-sensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): ---------------------------------------------------------------------- ^ the beginning of the string ---------------------------------------------------------------------- http 'http' ---------------------------------------------------------------------- s? 's' (optional (matching the most amount possible)) ---------------------------------------------------------------------- :// '://' ---------------------------------------------------------------------- (?! look ahead to see if there is not: ---------------------------------------------------------------------- www 'www' ---------------------------------------------------------------------- \. '.' ---------------------------------------------------------------------- ) end of look-ahead ---------------------------------------------------------------------- robidu 'robidu' ---------------------------------------------------------------------- \. '.' ---------------------------------------------------------------------- de/ 'de/' ---------------------------------------------------------------------- ) end of grouping ---------------------------------------------------------------------- #### The regular expression: (?-imsx:^https?://.*?\.?(?