check if string is uppercase regex js code example Example: regex for lowercase letters js function hasLowerCase(str) { return (/[a-z]/.test(str)); }