I have a string containing text, in this text there are several domains included such as google.de www.google.de etc... I want to capture these, but ignore domain encapsulated in square brackets. At the moment I have the following:
https://regex101.com/r/t8IMd1/3
It doesn't ignore the encapsulated one though I used a negative lookahead.
What I have to do if more than one domain is in one line?
I don't get it at the moment, so I try to list all requirements and hope someone can provide a explained solution:
- domain names can be www.domain.de || domain.de || domain.de/something
- its a multiline text string, so the domains can occur on one line beside each other or in different lines
- they are divided by one or more whitespaces
- when domains are encapsulated in [domain] or [noscript]domain[/noscript] they have to be ignored