me: i need to validate some email addresses, so i am going to write a quick regex.
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft
YOU SHALL NOT PASS!!! -
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft ah, yeah, been zhere, done that. That demon still owes me money.
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft RegEx, almost always the wrong choice
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft One thing I've learned over the years, is never try to validate an email address with regex !
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuckCopy a relatively good existing one, then just prompt for "are you sure" if it fails to match.
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft I think this is the right page from the Necronomicon: (?:[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])+)\])
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft Ah, did the reghex by mistake huh?!
-
@nixCraft Just take a predefined one from someone else. Creating such complex regex is a waste of time and never totally right 🫠.
@clemensprill @nixCraft Shhhhh! 🤫 Let the normies think we write them like wizards
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft not to be that guy, but I've always wondered if this could be turned into a product or something
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft If we ever get a Ten Commandments for programming, one of them should be:
"Thou shalt not write thy own email regex."
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft
At your point it might be easier to just search haveibeenpwned for the address -
@nixCraft If we ever get a Ten Commandments for programming, one of them should be:
"Thou shalt not write thy own email regex."
@mahryekuh @nixCraft I thought it was reserved as a karmic punishment,
you shall be cast into the darkness with the regex nought to return until the email be atuned
type stuff
Or was that a nightmare. . .? -
R relay@relay.an.exchange shared this topic
-
@nixCraft RegEx, almost always the wrong choice
@zephyrxero @nixCraft
"I should have used logic, but this keeps the complexity rating down." -
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft Unwanted Summonings in Cyberspace
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft
I gave up when I realised emojis were valid characters in email addresses. -
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuck@nixCraft The plural of "regex" is "regrets"

-
@nixCraft regex might be hard, the email addresses RFC is "wild", cf.
The answer that quiz gives on question 7 is not how I read the RFC. I looked at both RFC 821 and RFC 5321, neither permits spaces in an unqouted local-part.
-
me: i need to validate some email addresses, so i am going to write a quick regex. how hard can it be?
*4 hours later*
me. i now have 2 problems and one of them is that I've accidentally summoned an ancient daemon. wht the actual fuckDid you find the needle in the haystack yet? /s
-
The answer that quiz gives on question 7 is not how I read the RFC. I looked at both RFC 821 and RFC 5321, neither permits spaces in an unqouted local-part.
-