Possible Duplicate:
regular expression for letters, numbers and - _
I am creating a signup form in PHP and need to ensure that user's usernames don't contain unwanted characters. Is there anyway I can create a function that returns true for A-Z a-z 0-9 - . _
.
Also I do not want the user's emails to be from yahoo as for some reason they reject the confirmation emails sent. Along with __FILTER_VALIDATE_EMAIL__
what would I need to add?
PS: is there anything wrong with the characters I have mentioned above? I have noted that gmail doesn't allow -_
only . and YouTube only alpha-numeric characters.