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,122
  • 6
  • 19
  • 24

1 Answers1

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

It works for emails like this:

name@name.com
William Kinaan
  • 28,059
  • 20
  • 85
  • 118