I want to validate a form field, by preventing the user from entering the domain name with www or http so I wrote a regular expression as follows.
/^(www|http)/
What I want is the opposite of the written regular expression. So that I can have the expected result.
Expected result:
- www.google.com - invalid
- http://apple.co.uk - invalid
- http://www.water.com -invalid
- google.com - should be valid
- apple.co.uk - should be valid
How to get the opposite of the regular expression