Possible Duplicate:
PHP email validation
I'm working on this website, where I have to make a register form. I made it work, but then my friend told me, that some email domain names does have hyphens in them, like;
test@test-tester.com
Right now my code look like this:
preg_match("/^[a-zA-Z0-9._\-]\w+(\.\w+)*\@\w+(\.[a-zA-Z0-9._-]+)*\.[a-zA-Z.]{2,6}$/", $_POST["email"]
What I can see, this should work, but it still does not allow the hyphen. Anyone know why?