I am trying to write a basic regex to validate an email address. For this specific case I am trying to make sure the string inputted only includes letters, numbers, "." and "@". Or in other words I am making sure it doesnt include characters like £&¬! etc.
I tried getting the NOT version of this [[:alnum:].@]+ so that it would highlight a character not in that set but I couldnt get it to work. I also tried characters not in [\W.@]+ (the . is meant to be escaped but stackoverflow is removing the \ from this post) but the \W is still picking up the . and @ symbols.