var regexLetter = /[a-zA-Z]/ code example Example: regex only letters not spaces var re = /^[A-Za-z]+$/;