javascript check if string contains only english alphabets with some other character code example Example: how to check if a string has only alphabets in javascript if (!/[^a-zA-Z]/.test(word))