8
cascer1
4y

when you have to validate an email address to fit the requirements of some stupid mail software

(^$|^([^<>()\[\].,;:\s@!&#$%+'{}|~*="]+(\.?[^<>()\[\].,;:\s@!&#$%'{}|~*="]+)*))@((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|(([a-zA-Z\-0-9]+.)+[a-zA-Z]{2,})$)

I'm not even sorry.

Comments
  • 3
    Rather write this in long way than this.
  • 3
    Sorry, but is this a regex??
  • 1
    Ohhh my..
  • 1
    What the fuck is that
  • 3
    First mistake I see is that an email addresses local part can not have a dot '.' as the first or last character. Also there can't be two or more consecutive ones unless the entire local part is quoted.
  • 1
    You do a not validate emails.

    It's pointless and stupid.
Add Comment