regex for a to z 0 to 9 and -,. code example Example: regex check from a-z 0-9 myString.match(/^[A-Za-z0-9_.]+$/)