I was working on a project, and I was wondering if I can make something like a email entering system, probably using a class. I want it to do the following -
1. First perform a prelim check for any invalid special characters.
2. Perform a check for the @ sign (which should be present only once), and atleast one or more periods ('.')
Its easy to check for point 1, but I dont know how to accomplish point 2 simultaneously. Even one @ sign would be easily 'caught' in the first check, and if I make that an exception (by not putting it in the list for checking symbols), then multiple instances of the '@" will be possible...not realistic.