While searching for regular expressions used for email address validation, i came across this page: http://www.regular-expressions.info/email.html. i couldn't understand it.
it says: \b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+.)+[A-Z]{2,4}\b will match john@server.department.company.com but not john@aol...com.
Can you explain how (?:[A-Z0-9-]+\.)
works in detail and how it doesn't match john@aol...com
and matches the other one?