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 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.
-
-
-
-
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 Either you use something simple like
.*@.*\..*(at least an at-sign and a dot after it) and send an e-mail with an link or you will summon a debate war on if the complete e-mail standards should be followed or not.And, if you choose to follow the standards, I have to warn you (and I guess some people had warned you already) that most e-mail servers do not follow the standard (like Cloudflare).
On the other hand, I just sent a message from
"example+';DROP/**/TABLE/**/users;#"@gmail.comtoexample@some-domain-of-mineand it arrived. I hope you never need to deal with addresses like those. -
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 My experience tells me that if you have a problem and you solve it with regular expressions, you have two problems.
-
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 -
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 fuckAt least the ancient demon is bound to serve you, and not eat you until it provides you with a perfect email parsing library, right?