So I need to match upper and lower case a-z letters, period (.) and @ in a string. As a complication the string must have @ exactly once anywhere in the string and . at least once anywhere in the string.
abcd@. // match
@ab.cd // match
a@cd@. // no match
abcd@ // no match
I've tried to be clever (obviously not very) by doing look ahead but this one seems tricky eg.
(?=[@]){1}[a-zA-Z@]+$