259
you are viewing a single comment's thread
view the rest of the comments
[-] custom_situation@lemm.ee 4 points 1 year ago

so, where’s the email address regex? that’s where this lives or dies. there is no reason to use this for extremely simple happy-path regexes.

i’m having a tough time understanding who this is for. a beginner might think this is great, but they’re shooting themselves in the foot by adding an additional layer of abstraction rather than reading something to learn the basics.

[-] TerrorBite@meow.social 6 points 1 year ago

I am of the opinion that regex for email address is a bad idea. The only two things that you need to check an email address are:

Does the address contain an @ symbol?
Is there a dot to the right of the @ symbol?

Then just try to deliver to it, and let the MTA do the rest.

Email addresses can be complicated, and there's plenty of valid addresses that can be excluded by attempts at regex validation.

@custom_situation @yoavlavi

[-] dhruv@lemmy.dbzer0.com 1 points 1 year ago

If it can do that, i might just use it. It'll make code a whole lot cleaner to read.

load more comments (3 replies)
load more comments (4 replies)
this post was submitted on 16 Jul 2023
259 points (93.3% liked)

Programming

17025 readers
86 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS