Write a JavaScript program to check first character of entered string is uppercase or not using regular expression.
<html>
<head>
<title>Regular expression - Checking for First letter capital</title>
<script>
function checkUpper(txt)
{
var re = /^[A-Z]/
if(re.test(txt.value))
alert("String's first character is uppercase")
else
alert("String's first character is not uppercase")
}
</script>
</head>
<body>
Enter some text <input type="text" id="txt" onblur="checkUpper(this)"/>
<body>
</html>
