<html>
<head>
<title>Matching a sequence of literal characters</title>
<script type="text/javascript" language="javascript">
<!-- //
function IsMatchingCode(str){
var myRegExp = /[A-Z][0-9]/ ;
return myRegExp.test(str)
}
function TestGuess(){
alert(IsMatchingCode("a3"));
}
// -->
</script>
</head>
<body>
<form>
<button type="Button" onclick="TestGuess()">Click here to guess</button>
</form>
</body>
</html>
|