From what I understand, a yahoo IM account can be made up of a-z A-Z 0-9 as well as . _ and -
Now i'm trying to write a regex to validate this:
/[_-0-9a-zA-Z\s]+$/ is what I have so far
It works fine, however the user should not be allowed to enter -- in the name, to stop a SQL injection exploit.
Does anyone know how I would go about allowing - but not --?
Thanks 😃