check if a word is cointained in a string js lower or upper case code example
Example 1: how to check string uppercase or lowersace using regex javascript
var regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!#\*\?])(?=.{8,})/;
Example 2: how to find if given character in a string is uppercase or lowercase in javascript
var str = S;
if (str == str.toUpperCase())
{
console.log(" Uppercase");
}
else
{
console.log("Lowercase");
}