1function isLetter(str) {
2 return str.length === 1 && str.match(/[a-z]/i);
3}
1function isAlphaOrParen(str) {
2 return /^[a-zA-Z()]+$/.test(str);
3}
4
5/*/^[a-zA-Z()]*$/ - also returns true for an empty string
6/^[a-zA-Z()]$/ - only returns true for single characters.
7/^[a-zA-Z() ]+$/ - also allows spaces*/
8//better regEX to include question marks too