Email Validation

More
4 months 2 days ago - 4 months 2 days ago #148987 by jelo
jelo replied the topic: Email Validation
You can try it with this stuff:
^(?:(?:[\w`~!#$%^&*\-=+;:{}'|,?\/]+(?:(?:\.(?:"(?:\\?[\w`~!#$%^&*\-=+;:{}'|,?\/\.()<>\[\] @]|\\"|\\\\)*"|[\w`~!#$%^&*\-=+;:{}'|,?\/]+))*\.[\w`~!#$%^&*\-=+;:{}'|,?\/]+)?)|(?:"(?:\\?[\w`~!#$%^&*\-=+;:{}'|,?\/\.()<>\[\] @]|\\"|\\\\)+"))@(?:[a-zA-Z\d\-]+(?:\.[a-zA-Z\d\-]+)*|\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])$

Since I'm bad at RegEx I use regexr.com/ to see what the whole thing is doing.
I'm confusing RegEx dialects too.
The
/^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})$/
isn't matching any email at all in RegExr.
Confusing with RegEx will never end ,-)
Last Edit: 4 months 2 days ago by jelo.

Please Log in to join the conversation.

More
4 months 2 days ago #148988 by tammo
tammo replied the topic: Email Validation
You convinced me: I will "validate" by making the user fill in twice.

Tammo


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

More
4 months 2 days ago #148989 by jelo
jelo replied the topic: Email Validation

tammo wrote: My dear jelo: irony does not work? Well, here it did! ;-)

Well, take a look here: www.ex-parrot.com/~pdw/Mail-RFC822-Address.html

Please Log in to join the conversation.

More
4 months 2 days ago #148991 by tammo
tammo replied the topic: Email Validation
Please forgive me, I thought you were making a joke, citing ex-parrot:

en.wikipedia.org/wiki/Dead_Parrot_sketch

Tammo


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

More
4 months 2 days ago - 4 months 2 days ago #148993 by jelo
jelo replied the topic: Email Validation

tammo wrote: You convinced me: I will "validate" by making the user fill in twice.

"Clever" validation drives me mad. I once had to fill out x pages online and than the system was not accepting my correct email-address. Or a shop wouldn't take my order cause the bank account number had an "unusual" pattern. It was a correct bank account number but the programmer of the shop knew it better. The little shop was Amazon and it took them a long time to correct this.

Our surveys may not have that impact but using all this clever stuff can cause pain on the other said (as my posts do from time to time).

Pro and cons about email validation:
www.regular-expressions.info/email.html

tammo wrote: Please forgive me, I thought you were making a joke, citing ex-parrot:

It was my intention to let it look like a joke.

These email-adresses are possible and technically valid. Not that they are the most common once, but since developers sometimes want to rule the world with one RegEx these are nice testobjects.

"abcdefghixyz"@example1.com
abc."defghi".This email address is being protected from spambots. You need JavaScript enabled to view it.
disposable.style.email.with+symbol@example.com
"much.more unusual"@example.com
"very.unusual.@.unusual.com"@example.com
#!$%&'*+-/=?^_`{}|~@example.org
"()<>[]:,;@\\\"!#$%&'*+-/=?^_`{}| ~.a"@example.org
" "@example.org
test@[192.168.1.1]
Last Edit: 4 months 2 days ago by jelo.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now