Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Email fix for #3755 #3955

Merged
merged 2 commits into from
Apr 28, 2016
Merged

Email fix for #3755 #3955

merged 2 commits into from
Apr 28, 2016

Conversation

ScopeyNZ
Copy link
Contributor

In the end I did a bit of research and borrowed the email regex used in angular.js.

@kevinresol
Copy link

kevinresol commented Apr 26, 2016

Seems that this regexp is more accurate: (I forgot the source though)

/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

Examples: http://try.haxe.org/#0B65c

@jlukic
Copy link
Member

jlukic commented Apr 28, 2016

If it works for angular it works for me

@kevinresol If you can qualify the differences in your regex I would consider.

@jlukic jlukic merged commit 92c1cd1 into Semantic-Org:next Apr 28, 2016
@jlukic
Copy link
Member

jlukic commented Apr 28, 2016

Added rlsnotes af7fcf6

@jlukic jlukic added this to the 2.1.9 milestone Apr 28, 2016
@kevinresol
Copy link

@jlukic in the link I posted previously you can press "Build + Run" to try it.

You should be able to notice that k.@cc.com is considered as valid email address by angular's regex while it should not be. And my suggested regex correctly recognize that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants