Belgae Social
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
TheBigRoomXXL@leminal.space to Programmer Humor@programming.devEnglish · 3 days ago

Everyone knows what an email address is, right? (Quiz)

e-mail.wtf

external-link
message-square
153
link
fedilink
885
external-link

Everyone knows what an email address is, right? (Quiz)

e-mail.wtf

TheBigRoomXXL@leminal.space to Programmer Humor@programming.devEnglish · 3 days ago
message-square
153
link
fedilink
Email is Easy
e-mail.wtf
external-link
Everyone knows what an email address is, right?
  • axEl7fB5@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago
    const emailRegExp = /^[\w.!#$%&'*+/=?^`{|}~-]+@[a-z\d-]+(?:\.[a-z\d-]+)*$/i;
    

    per the HTML specification. From https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Form_validation#validating_forms_without_a_built-in_api

    • notarobot@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      That’s one very random place to find that. There are a lot of different one and there is no way we all just agree to use that one.

      Look art his site that shows a more complete and (in theory) official website. While also explaining that there is no regex that is perfect

      https://emailregex.com/

      (Compete regex for the lazy)

      (?:\[a-z0-9!#$%&'\*+/=?^\_\`{|}\~-]+(?:\\.\[a-z0-9!#$%&'\*+/=?^\_\`{|}\~-]+)\*|"(?:\[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])\*")@(?:(?:\[a-z0-9]\(?:\[a-z0-9-]\*\[a-z0-9])?\\.)+\[a-z0-9]\(?:\[a-z0-9-]\*\[a-z0-9])?|\\\[(?:(?:25\[0-5]|2\[0-4]\[0-9]|\[01]?\[0-9]\[0-9]?)\\.){3}(?:25\[0-5]|2\[0-4]\[0-9]|\[01]?\[0-9]\[0-9]?|\[a-z0-9-]\*\[a-z0-9]:(?:\[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])
      
      • axEl7fB5@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        MDN isn’t a very random place?

        • notarobot@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          No. But it’s on the form validation topic.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 2.2K users / day
  • 5.79K users / week
  • 9.37K users / month
  • 10.2K users / 6 months
  • 1 local subscriber
  • 25.8K subscribers
  • 348 Posts
  • 6.05K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org