I have a below RegExp
[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=][A-Z0-9]{3,10})
It matches domain along with its subdomain and parameters are also needed to be provided in an address, however, I want to be able to exclude some subdomains from matching. I've tried using negative Lookhead in order to achieve this, but without success.
^((?!(domain|orsubdomain)).)*$
Texts which should match the pattern:
nicesite.abc.com/abcs
nicesite.com/abcs
and shouldn't match:
niceDomain.com/abcs
hello.orsubdomain.com/abcs
Any help would be much appreciated.