2

Possible Duplicate:
How should I validate an e-mail address on Android?

I used this:

Pattern.matches("^(.+)@([^@]+[^.])$", email)

it didn't work when I enter asdf@asdf , why pelase?

Community
  • 1
  • 1
user user
  • 2,022
  • 6
  • 18
  • 24

1 Answers1

3
Pattern.matches("^(.+)@([^@]+[^.]).([^.])$", email)

It works for emails like this:

name@name.com
William Kinaan
  • 26,773
  • 20
  • 80
  • 118