Since the whole upload gets cancelled anytime there is an invalid email, I’d like to filter our invalid emails with the regex that Hubspot uses to validate emails. Is this available somewhere? If nt, can you please share?
I ended using the Validate_email Python package, but we’ve still been getting some errors.
I think this list, https://data.iana.org/TLD/tlds-alpha-by-domain.txt, found on the page referenced by dadams will solve the last bit of problems.
@Jonathan_Marsan you may not get the exact HubSpot regex, but you can start with a very simple expression, see if it eliminates your upload failures, and iterate from there.
A very simplistic starting point:
^[^@]+@[^\.]+\..+$
This will detect the most common email irregularities: