On 2023-11-01, Chris Angelico via Python-list <python-list@python.org> wrote: > On Thu, 2 Nov 2023 at 08:09, Grant Edwards via Python-list ><python-list@python.org> wrote:
>> Make sure it has an '@' in it. Possibly require at least one '.' >> after the '@'. > > No guarantee that there'll be a dot after the at. Ah, I forgot about defaulting to a local domain if one is omitted. Will MTAs do that these days? > (Technically there's no guarantee of an at sign either, but email > addresses without at signs are local-only, so in many contexts, you > can assume there needs to be an at.) > > So the regex to match all valid email addresses that aren't > local-only is... drumroll please... > > r"@" Unless you want to support UUCP or X400 addresses... :) -- https://mail.python.org/mailman/listinfo/python-list