Match : Match : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » Match »

 

Match

















<html>
<head>
<title>Matching a single literal character</title>
<script type="text/javascript" language="javascript">
<!-- //
function IsMatchingChar(str){
    var myRegExp = /[aA]/ ;
    return myRegExp.test(str)
}

function TestGuess(){
    alert(IsMatchingChar('A'));
    alert(IsMatchingChar('a'));
}
// -->
</script>
</head>
<body>

<form>
<button type="Button" onclick="TestGuess()">Click here to guess</button>
</form>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» Match