The regular expressions below can be used to validate if a string is an email address and to extract email addresses from a string. This validation method however does not guarantee that the emails validated and extracted actually exist.
This Python regular expression is compliant to RFC 5322 standard which allows for the most complete validation. Usually, you should not use it because it is an overkill. In most cases apps are not able to handle all emails that this regex allows.
As was stated previously, Python regex email validation can not fully guarantee that email exists and the message can be delivered. The best way how to know for sure that email is valid is to actually send an email to that address because even paid email validation services do not provide a 100% guarantee for that.
Create an internal tool with UI Bakery
Discover UI Bakery – an intuitive visual internal tools builder.