0

I have the following rule to match any website that begins with two numbers:

([0-9]+[0-9]+[a-z]+)+(\.net|\.com)

It matches domains like:

99abc.com 78c.net

How can I exclude from this rule a list of specific websites, for example

10ofthose.com 180post.net etc...?

  • 1
    You mean you want to exclude addresses that has more than 2 numbers at the beginning of the string? Or do you want to exclude only those 2 addresses? – Maciej Los Aug 19 '21 at 06:59

1 Answers1

3

You could a negative lookahead blacklist to the start of the pattern:

^(?!(?:10ofthose\.com|180post\.net)$)[0-9]{2}[a-z]+\.(?:net|com)$

Demo

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360