regular expression for only alphabets and space code example Example: only letters and spaces regex /^[a-zA-Z\s]*$/g